When shared mode is active, spack treats the normal install directory as an upstream

This commit is contained in:
Carson Woods
2019-06-27 11:57:26 -06:00
parent 9e9adf1d2f
commit b4dae1b7fd

View File

@@ -590,6 +590,12 @@ def shell_set(var, value):
other_spack_instances = spack.config.get(
'upstreams') or {}
if spack.config.get('config:shared'):
path = spack.util.path.canonicalize_path("$spack/opt/spack")
other_spack_instances.update({'spack-root':
{'install_tree': path}})
for install_properties in other_spack_instances.values():
upstream_module_roots = install_properties.get('modules', {})
for module_type, root in upstream_module_roots.items():