diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 593a1f43bd9..b20a201f149 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -1499,12 +1499,14 @@ def do_install(self, **kwargs): global_root = spack.config.get('upstreams') global_root = global_root['global']['install_tree'] global_root = spack.util.path.canonicalize_path(global_root) - spack.config.set('config:active_tree', global_root) + spack.config.set('config:active_tree', global_root, + scope='user') elif upstream: raise NotImplementedError else: spack.config.set('config:active_tree', - spack.config.get('config:install_tree')) + spack.config.get('config:install_tree'), + scope='user') # For external packages the workflow is simplified, and basically # consists in module file generation and registration in the DB