diff options
author | Harmen Stoppels <me@harmenstoppels.nl> | 2024-04-05 12:31:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-05 12:31:21 +0200 |
commit | 411576e1fa125b7eb58f816c2d2b6da0bcb95555 (patch) | |
tree | 18b8d23a5b00139da75139871cc15283c8e0822a | |
parent | cab4f92960706d0c238a7dc47db82236078f9fdd (diff) | |
download | spack-411576e1fa125b7eb58f816c2d2b6da0bcb95555.tar.gz spack-411576e1fa125b7eb58f816c2d2b6da0bcb95555.tar.bz2 spack-411576e1fa125b7eb58f816c2d2b6da0bcb95555.tar.xz spack-411576e1fa125b7eb58f816c2d2b6da0bcb95555.zip |
Do not acquire a write lock on the env post install if no views (#43505)
-rw-r--r-- | lib/spack/spack/cmd/install.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/spack/spack/cmd/install.py b/lib/spack/spack/cmd/install.py index aa958a682c..755fab7fa6 100644 --- a/lib/spack/spack/cmd/install.py +++ b/lib/spack/spack/cmd/install.py @@ -420,10 +420,9 @@ def install_with_active_env(env: ev.Environment, args, install_kwargs, reporter_ with reporter_factory(specs_to_install): env.install_specs(specs_to_install, **install_kwargs) finally: - # TODO: this is doing way too much to trigger - # views and modules to be generated. - with env.write_transaction(): - env.write(regenerate=True) + if env.views: + with env.write_transaction(): + env.write(regenerate=True) def concrete_specs_from_cli(args, install_kwargs): |