Update packages.yaml format and support configuration updates

The YAML config for paths and modules of external packages has
changed: the new format allows a single spec to load multiple
modules. Spack will automatically convert from the old format
when reading the configs (the updates do not add new essential
properties, so this change in Spack is backwards-compatible).

With this update, Spack cannot modify existing configs/environments
without updating them (e.g. “spack config add” will fail if the
configuration is in a format that predates this PR). The user is
prompted to do this explicitly and commands are provided. All
config scopes can be updated at once. Each environment must be
updated one at a time.
This commit is contained in:
Massimiliano Culpo
2020-07-31 12:58:48 +02:00
committed by Peter Scheibel
parent 1398038bee
commit 193e8333fa
35 changed files with 1134 additions and 240 deletions

View File

@@ -1,26 +1,32 @@
packages:
cmake:
buildable: False
paths:
cmake@3.12.4: /usr
externals:
- spec: cmake@3.12.4
prefix: /usr
r:
buildable: False
paths:
r@3.4.4: /usr
externals:
- spec: r@3.4.4
prefix: /usr
perl:
buildable: False
paths:
perl@5.26.1: /usr
externals:
- spec: perl@5.26.1
prefix: /usr
findutils:
buildable: False
paths:
findutils@4.6.0: /usr
externals:
- spec: findutils@4.6.0
prefix: /usr
openssl:
buildable: False
paths:
openssl@1.1.1: /usr
externals:
- spec: openssl@1.1.1
prefix: /usr
libpciaccess:
buildable: False
paths:
libpciaccess@0.13.5: /usr
externals:
- spec: libpciaccess@0.13.5
prefix: /usr

View File

@@ -570,7 +570,7 @@ _spack_config() {
then
SPACK_COMPREPLY="-h --help --scope"
else
SPACK_COMPREPLY="get blame edit list add remove rm"
SPACK_COMPREPLY="get blame edit list add remove rm update revert"
fi
}
@@ -632,6 +632,24 @@ _spack_config_rm() {
fi
}
_spack_config_update() {
if $list_options
then
SPACK_COMPREPLY="-h --help -y --yes-to-all"
else
_config_sections
fi
}
_spack_config_revert() {
if $list_options
then
SPACK_COMPREPLY="-h --help -y --yes-to-all"
else
_config_sections
fi
}
_spack_containerize() {
SPACK_COMPREPLY="-h --help"
}
@@ -725,7 +743,7 @@ _spack_env() {
then
SPACK_COMPREPLY="-h --help"
else
SPACK_COMPREPLY="activate deactivate create remove rm list ls status st loads view"
SPACK_COMPREPLY="activate deactivate create remove rm list ls status st loads view update revert"
fi
}
@@ -803,6 +821,24 @@ _spack_env_view() {
fi
}
_spack_env_update() {
if $list_options
then
SPACK_COMPREPLY="-h --help -y --yes-to-all"
else
_environments
fi
}
_spack_env_revert() {
if $list_options
then
SPACK_COMPREPLY="-h --help -y --yes-to-all"
else
_environments
fi
}
_spack_extensions() {
if $list_options
then