summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorPeter Scheibel <scheibel1@llnl.gov>2019-03-27 13:06:46 -0700
committerGreg Becker <becker33@llnl.gov>2019-03-27 13:06:46 -0700
commit99f35c333814f9c7fa320a928a98bbbacdd66e92 (patch)
tree18e836273ce49787501a1c159e551eb650c3831b /share
parent298a55b28fcc04e4085e14c6f2999e14cc224d60 (diff)
downloadspack-99f35c333814f9c7fa320a928a98bbbacdd66e92.tar.gz
spack-99f35c333814f9c7fa320a928a98bbbacdd66e92.tar.bz2
spack-99f35c333814f9c7fa320a928a98bbbacdd66e92.tar.xz
spack-99f35c333814f9c7fa320a928a98bbbacdd66e92.zip
spack chain (#8772)
* initial work to make use of an 'upstream' spack installation: this uses the DB of the upstream installation to check if a package is installed * need to query upstream dbs when adding new record to local db * prevent reindexing upstream DBs * set prefix on specs read from DB based on path stored in install record * check that Spack does not install packages that are recorded as installed in an upstream db * externals do not add their path to install records - need to use 'external_path' to get path of upstream externals * views need to check for upstream installations when linking metadata * package and spec now calculate upstream installation properties on-demand themselves rather than depending on concretization to set these properties up-front. The added tests for upstream installations don't work with this new strategy so they need to be updated * only refresh modules for local specs (not those in upstream packages); optionally generate local module files for packages installed upstream * when a user tries to locate a module file for a package installed upstream, tell them to use the upstream spack instance to locate it * support recursive upstream databases (allow upstream databases to use their own upstream databases) * separate upstream config into separate file with its own schema; each entry now also includes a name * metadata_dir is no longer customizable on a per-instance basis for YamlDirectoryLayout * treat metadata_dir as an instance variable but dont set it from kwargs; this follows several other hardcoded variables which must be consistent between upstream and downstream DBs. Also update DirectoryLayout.metadata_path to work entirely with Spec.prefix, since Spec.prefix is set from the DB when available (so metadata_path was duplicating that logic)
Diffstat (limited to 'share')
-rwxr-xr-xshare/spack/setup-env.csh11
-rwxr-xr-xshare/spack/setup-env.sh13
2 files changed, 20 insertions, 4 deletions
diff --git a/share/spack/setup-env.csh b/share/spack/setup-env.csh
index ea18d377e3..f2b5b00006 100755
--- a/share/spack/setup-env.csh
+++ b/share/spack/setup-env.csh
@@ -25,8 +25,15 @@ if ($?SPACK_ROOT) then
eval `spack --print-shell-vars csh`
# Set up modules and dotkit search paths in the user environment
- _spack_pathadd DK_NODE "$_sp_dotkit_root/$_sp_sys_type"
- _spack_pathadd MODULEPATH "$_sp_tcl_root/$_sp_sys_type"
+ set tcl_roots = `echo $_sp_tcl_roots:q | sed 's/:/ /g'`
+ foreach tcl_root ($tcl_roots:q)
+ _spack_pathadd MODULEPATH "$tcl_root/$_sp_sys_type"
+ end
+
+ set dotkit_roots = `echo $_sp_dotkit_roots:q | sed 's/:/ /g'`
+ foreach dotkit_root ($dotkit_roots)
+ _spack_pathadd DK_NODE "$dotkit_root/$_sp_sys_type"
+ end
else
echo "ERROR: Sourcing spack setup-env.csh requires setting SPACK_ROOT to "
echo " the root of your spack installation."
diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh
index 19bb3e24e8..3698bb35b0 100755
--- a/share/spack/setup-env.sh
+++ b/share/spack/setup-env.sh
@@ -290,8 +290,17 @@ fi;
#
# set module system roots
#
-_spack_pathadd DK_NODE "${_sp_dotkit_root%/}/$_sp_sys_type"
-_spack_pathadd MODULEPATH "${_sp_tcl_root%/}/$_sp_sys_type"
+_sp_multi_pathadd() {
+ local IFS=':'
+ if [[ -n "${ZSH_VERSION:-}" ]]; then
+ setopt sh_word_split
+ fi
+ for pth in "$2"; do
+ _spack_pathadd "$1" "${pth}/${_sp_sys_type}"
+ done
+}
+_sp_multi_pathadd MODULEPATH "$_sp_tcl_roots"
+_sp_multi_pathadd DK_NODE "$_sp_dotkit_roots"
# Add programmable tab completion for Bash
#