diff options
-rw-r--r-- | lib/spack/spack/cmd/uninstall.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py index 2022290057..d51a8f8e3b 100644 --- a/lib/spack/spack/cmd/uninstall.py +++ b/lib/spack/spack/cmd/uninstall.py @@ -151,7 +151,8 @@ def installed_dependents(specs: List[spack.spec.Spec]) -> List[spack.spec.Spec]: key=lambda s: s.dag_hash(), ) - return [spec for spec in specs if is_installed(spec)] + with spack.store.STORE.db.read_transaction(): + return [spec for spec in specs if is_installed(spec)] def dependent_environments( |