Add logic to set the active install tree
This commit is contained in:
@@ -1492,6 +1492,17 @@ def do_install(self, **kwargs):
|
||||
dirty = kwargs.get('dirty', False)
|
||||
restage = kwargs.get('restage', False)
|
||||
install_global = kwargs.get('install_global', False)
|
||||
upstream = kwargs.get('upstream', False)
|
||||
|
||||
# Install Package to Global Upstream for multi-user use
|
||||
if install_global:
|
||||
global_root = spack.config.get('upstreams')['global']['install_tree']
|
||||
global_root = spack.util.path.canonicalize_path(global_root)
|
||||
spack.config.set('config:active_tree', global_root)
|
||||
elif upstream:
|
||||
raise NotImplementedError
|
||||
else:
|
||||
spack.config.set('config:active_tree', spack.config.get('config:install_tree'))
|
||||
|
||||
# For external packages the workflow is simplified, and basically
|
||||
# consists in module file generation and registration in the DB
|
||||
|
||||
Reference in New Issue
Block a user