diff options
author | Harmen Stoppels <harmenstoppels@gmail.com> | 2022-03-24 14:25:00 +0100 |
---|---|---|
committer | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2022-04-14 11:08:17 +0200 |
commit | 9d00894c5a52957257671bfb469c5fb5f3a9d9d1 (patch) | |
tree | 148091839d3d0433bdcbc28df026c4bb4d362ec9 /lib | |
parent | 1cc2b82408b380bf13d057305bf62d479779d3ea (diff) | |
download | spack-9d00894c5a52957257671bfb469c5fb5f3a9d9d1.tar.gz spack-9d00894c5a52957257671bfb469c5fb5f3a9d9d1.tar.bz2 spack-9d00894c5a52957257671bfb469c5fb5f3a9d9d1.tar.xz spack-9d00894c5a52957257671bfb469c5fb5f3a9d9d1.zip |
fix --reuse w/ upstreams in env (#29680)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/environment/environment.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/spack/spack/environment/environment.py b/lib/spack/spack/environment/environment.py index ff85259cda..ad3fd3d571 100644 --- a/lib/spack/spack/environment/environment.py +++ b/lib/spack/spack/environment/environment.py @@ -144,10 +144,12 @@ def activate(env, use_env_repo=False): # Check if we need to reinitialize the store due to pushing the configuration # below. - store_before_pushing = spack.config.get('config:install_tree') + install_tree_before = spack.config.get('config:install_tree') + upstreams_before = spack.config.get('upstreams') prepare_config_scope(env) - store_after_pushing = spack.config.get('config:install_tree') - if store_before_pushing != store_after_pushing: + install_tree_after = spack.config.get('config:install_tree') + upstreams_after = spack.config.get('upstreams') + if install_tree_before != install_tree_after or upstreams_before != upstreams_after: # Hack to store the state of the store before activation env.store_token = spack.store.reinitialize() |