diff options
author | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2019-10-03 07:15:01 +0200 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2019-10-02 22:15:01 -0700 |
commit | 76b9c561109e4a19375231fd6e8fd8a1c7947f34 (patch) | |
tree | e68018d5397a30eee2eaa1926a2dcabbc75b5c18 /share/spack/setup-env.sh | |
parent | b11984767b79f05d261ef112a46e09bc1939204f (diff) | |
download | spack-76b9c561109e4a19375231fd6e8fd8a1c7947f34.tar.gz spack-76b9c561109e4a19375231fd6e8fd8a1c7947f34.tar.bz2 spack-76b9c561109e4a19375231fd6e8fd8a1c7947f34.tar.xz spack-76b9c561109e4a19375231fd6e8fd8a1c7947f34.zip |
Remove support for generating dotkit files (#11986)
Dotkit is being used only at a few sites and has been deprecated on new
machines. This commit removes all the code that provide support for the
generation of dotkit module files.
A new validator named "deprecatedProperties" has been added to the
jsonschema validators. It permits to prompt a warning message or exit
with an error if a property that has been marked as deprecated is
encountered.
* Removed references to dotkit in the docs
* Removed references to dotkit in setup-env-test.sh
* Added a unit test for the 'deprecatedProperties' schema validator
Diffstat (limited to 'share/spack/setup-env.sh')
-rwxr-xr-x | share/spack/setup-env.sh | 37 |
1 files changed, 11 insertions, 26 deletions
diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh index 0fd5eb30f7..d5cad059a6 100755 --- a/share/spack/setup-env.sh +++ b/share/spack/setup-env.sh @@ -7,8 +7,8 @@ ######################################################################## # # This file is part of Spack and sets up the spack environment for bash, -# zsh, and dash (sh). This includes dotkit support, module support, and -# it also puts spack in your path. The script also checks that at least +# zsh, and dash (sh). This includes environment modules and lmod support, +# and it also puts spack in your path. The script also checks that at least # module support exists, and provides suggestions if it doesn't. Source # it like this: # @@ -16,27 +16,27 @@ # ######################################################################## # This is a wrapper around the spack command that forwards calls to -# 'spack use' and 'spack unuse' to shell functions. This in turn -# allows them to be used to invoke dotkit functions. +# 'spack load' and 'spack unload' to shell functions. This in turn +# allows them to be used to invoke environment modules functions. # -# 'spack use' is smarter than just 'use' because it converts its -# arguments into a unique spack spec that is then passed to dotkit +# 'spack load' is smarter than just 'load' because it converts its +# arguments into a unique Spack spec that is then passed to module # commands. This allows the user to use packages without knowing all # their installation details. # # e.g., rather than requiring a full spec for libelf, the user can type: # -# spack use libelf +# spack load libelf # -# This will first find the available libelf dotkits and use a +# This will first find the available libelf module file and use a # matching one. If there are two versions of libelf, the user would # need to be more specific, e.g.: # -# spack use libelf@0.8.13 +# spack load libelf@0.8.13 # # This is very similar to how regular spack commands work and it # avoids the need to come up with a user-friendly naming scheme for -# spack dotfiles. +# spack module files. ######################################################################## spack() { @@ -140,7 +140,7 @@ spack() { fi return ;; - "use"|"unuse"|"load"|"unload") + "load"|"unload") # Shift any other args for use off before parsing spec. _sp_subcommand_args="" _sp_module_args="" @@ -161,20 +161,6 @@ spack() { # tool's commands to add/remove the result from the environment. # If spack module command comes back with an error, do nothing. case $_sp_subcommand in - "use") - if _sp_full_spec=$(command spack $_sp_flags module dotkit find $_sp_subcommand_args "$@"); then - use $_sp_module_args $_sp_full_spec - else - $(exit 1) - fi - ;; - "unuse") - if _sp_full_spec=$(command spack $_sp_flags module dotkit find $_sp_subcommand_args "$@"); then - unuse $_sp_module_args $_sp_full_spec - else - $(exit 1) - fi - ;; "load") if _sp_full_spec=$(command spack $_sp_flags module tcl find $_sp_subcommand_args "$@"); then module load $_sp_module_args $_sp_full_spec @@ -356,7 +342,6 @@ _sp_multi_pathadd() { done } _sp_multi_pathadd MODULEPATH "$_sp_tcl_roots" -_sp_multi_pathadd DK_NODE "$_sp_dotkit_roots" # Add programmable tab completion for Bash # |