summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2015-10-29 23:48:14 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2015-10-29 23:48:14 -0700
commitaec50722fc065450c94a01ec02597974e1ca8b0f (patch)
tree8dbf9789f9bb017ae6ff58dc7a8299e5814d6485
parenta1c42c27538c7dcd3093ea3c818116d97b87c8ee (diff)
parent6db2a580081f0afdacd48ed6163bfbe6baaeb62f (diff)
downloadspack-aec50722fc065450c94a01ec02597974e1ca8b0f.tar.gz
spack-aec50722fc065450c94a01ec02597974e1ca8b0f.tar.bz2
spack-aec50722fc065450c94a01ec02597974e1ca8b0f.tar.xz
spack-aec50722fc065450c94a01ec02597974e1ca8b0f.zip
Merge pull request #147 from epfl-scitas/bugfixes/db_context_manager
Fixed typo : write_lock() -> write_transaction()
-rw-r--r--lib/spack/spack/cmd/diy.py2
-rw-r--r--lib/spack/spack/cmd/install.py2
-rw-r--r--lib/spack/spack/cmd/uninstall.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/spack/spack/cmd/diy.py b/lib/spack/spack/cmd/diy.py
index f7998720ac..9f8a6d39db 100644
--- a/lib/spack/spack/cmd/diy.py
+++ b/lib/spack/spack/cmd/diy.py
@@ -59,7 +59,7 @@ def diy(self, args):
tty.die("spack diy only takes one spec.")
# Take a write lock before checking for existence.
- with spack.installed_db.write_lock():
+ with spack.installed_db.write_transaction():
spec = specs[0]
if not spack.db.exists(spec.name):
tty.warn("No such package: %s" % spec.name)
diff --git a/lib/spack/spack/cmd/install.py b/lib/spack/spack/cmd/install.py
index ba824bd658..836a6260c8 100644
--- a/lib/spack/spack/cmd/install.py
+++ b/lib/spack/spack/cmd/install.py
@@ -71,7 +71,7 @@ def install(parser, args):
specs = spack.cmd.parse_specs(args.packages, concretize=True)
for spec in specs:
package = spack.db.get(spec)
- with spack.installed_db.write_lock():
+ with spack.installed_db.write_transaction():
package.do_install(
keep_prefix=args.keep_prefix,
keep_stage=args.keep_stage,
diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py
index 1dae84444a..e80f2d2636 100644
--- a/lib/spack/spack/cmd/uninstall.py
+++ b/lib/spack/spack/cmd/uninstall.py
@@ -53,7 +53,7 @@ def uninstall(parser, args):
if not args.packages:
tty.die("uninstall requires at least one package argument.")
- with spack.installed_db.write_lock():
+ with spack.installed_db.write_transaction():
specs = spack.cmd.parse_specs(args.packages)
# For each spec provided, make sure it refers to only one package.