summaryrefslogtreecommitdiff
path: root/lib/spack/spack/cmd/mark.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/spack/spack/cmd/mark.py')
-rw-r--r--lib/spack/spack/cmd/mark.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/spack/spack/cmd/mark.py b/lib/spack/spack/cmd/mark.py
index 0069008c4f..66a84fb907 100644
--- a/lib/spack/spack/cmd/mark.py
+++ b/lib/spack/spack/cmd/mark.py
@@ -98,8 +98,9 @@ def do_mark(specs, explicit):
specs (list): list of specs to be marked
explicit (bool): whether to mark specs as explicitly installed
"""
- for spec in specs:
- spack.store.STORE.db.update_explicit(spec, explicit)
+ with spack.store.STORE.db.write_transaction():
+ for spec in specs:
+ spack.store.STORE.db.mark(spec, "explicit", explicit)
def mark_specs(args, specs):