From 193e8333fa23a2e9b44d44a80e153d9a27033860 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Fri, 31 Jul 2020 12:58:48 +0200 Subject: Update packages.yaml format and support configuration updates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- share/spack/qa/configuration/packages.yaml | 30 +++++++++++++--------- share/spack/spack-completion.bash | 40 ++++++++++++++++++++++++++++-- 2 files changed, 56 insertions(+), 14 deletions(-) (limited to 'share') diff --git a/share/spack/qa/configuration/packages.yaml b/share/spack/qa/configuration/packages.yaml index 076095a7ca..bd853c2386 100644 --- a/share/spack/qa/configuration/packages.yaml +++ b/share/spack/qa/configuration/packages.yaml @@ -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 diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index fc1b4e2a27..329b9f28ff 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -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 -- cgit v1.2.3-60-g2f50