Merge pull request #147 from epfl-scitas/bugfixes/db_context_manager
Fixed typo : write_lock() -> write_transaction()
This commit is contained in:
commit
aec50722fc
@ -59,7 +59,7 @@ def diy(self, args):
|
|||||||
tty.die("spack diy only takes one spec.")
|
tty.die("spack diy only takes one spec.")
|
||||||
|
|
||||||
# Take a write lock before checking for existence.
|
# Take a write lock before checking for existence.
|
||||||
with spack.installed_db.write_lock():
|
with spack.installed_db.write_transaction():
|
||||||
spec = specs[0]
|
spec = specs[0]
|
||||||
if not spack.db.exists(spec.name):
|
if not spack.db.exists(spec.name):
|
||||||
tty.warn("No such package: %s" % spec.name)
|
tty.warn("No such package: %s" % spec.name)
|
||||||
|
@ -71,7 +71,7 @@ def install(parser, args):
|
|||||||
specs = spack.cmd.parse_specs(args.packages, concretize=True)
|
specs = spack.cmd.parse_specs(args.packages, concretize=True)
|
||||||
for spec in specs:
|
for spec in specs:
|
||||||
package = spack.db.get(spec)
|
package = spack.db.get(spec)
|
||||||
with spack.installed_db.write_lock():
|
with spack.installed_db.write_transaction():
|
||||||
package.do_install(
|
package.do_install(
|
||||||
keep_prefix=args.keep_prefix,
|
keep_prefix=args.keep_prefix,
|
||||||
keep_stage=args.keep_stage,
|
keep_stage=args.keep_stage,
|
||||||
|
@ -53,7 +53,7 @@ def uninstall(parser, args):
|
|||||||
if not args.packages:
|
if not args.packages:
|
||||||
tty.die("uninstall requires at least one package argument.")
|
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)
|
specs = spack.cmd.parse_specs(args.packages)
|
||||||
|
|
||||||
# For each spec provided, make sure it refers to only one package.
|
# For each spec provided, make sure it refers to only one package.
|
||||||
|
Loading…
Reference in New Issue
Block a user