diff options
author | Harmen Stoppels <harmenstoppels@gmail.com> | 2022-03-24 14:25:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-24 13:25:00 +0000 |
commit | 1a728c98ffc7dc2607fd725d48bda4e774262192 (patch) | |
tree | 4670f8cf7577b163b3984c76c2ce1919bb693b08 | |
parent | 59e522e8154e28d7af3f0cc8538e5a94d1345352 (diff) | |
download | spack-1a728c98ffc7dc2607fd725d48bda4e774262192.tar.gz spack-1a728c98ffc7dc2607fd725d48bda4e774262192.tar.bz2 spack-1a728c98ffc7dc2607fd725d48bda4e774262192.tar.xz spack-1a728c98ffc7dc2607fd725d48bda4e774262192.zip |
fix --reuse w/ upstreams in env (#29680)
-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 5acac8c390..1c5e1d46c1 100644 --- a/lib/spack/spack/environment/environment.py +++ b/lib/spack/spack/environment/environment.py @@ -146,10 +146,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() |