From 3f472039c55cd7a5d73fb0b0bf63317669733e8a Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 21 May 2024 21:16:04 +0200 Subject: Take a lock before querying installed_dependents (#44301) Co-authored-by: Harmen Stoppels --- lib/spack/spack/cmd/uninstall.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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( -- cgit v1.2.3-70-g09d2