diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 5e9a8ee329b..d95f0901ed8 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -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