uninstall : removed global lock
This commit is contained in:
parent
b3a6e307b9
commit
74fb1029fa
@ -193,8 +193,6 @@ def uninstall(parser, args):
|
|||||||
if not args.packages and not args.all:
|
if not args.packages and not args.all:
|
||||||
tty.die("uninstall requires at least one package argument.")
|
tty.die("uninstall requires at least one package argument.")
|
||||||
|
|
||||||
with spack.installed_db.write_transaction():
|
|
||||||
|
|
||||||
uninstall_list = get_uninstall_list(args)
|
uninstall_list = get_uninstall_list(args)
|
||||||
|
|
||||||
if not args.yes_to_all:
|
if not args.yes_to_all:
|
||||||
|
@ -1306,10 +1306,11 @@ def do_uninstall(self, force=False):
|
|||||||
raise PackageStillNeededError(self.spec, dependents)
|
raise PackageStillNeededError(self.spec, dependents)
|
||||||
|
|
||||||
# Pre-uninstall hook runs first.
|
# Pre-uninstall hook runs first.
|
||||||
|
with self._prefix_write_lock():
|
||||||
spack.hooks.pre_uninstall(self)
|
spack.hooks.pre_uninstall(self)
|
||||||
|
|
||||||
# Uninstalling in Spack only requires removing the prefix.
|
# Uninstalling in Spack only requires removing the prefix.
|
||||||
self.remove_prefix()
|
self.remove_prefix()
|
||||||
|
#
|
||||||
spack.installed_db.remove(self.spec)
|
spack.installed_db.remove(self.spec)
|
||||||
tty.msg("Successfully uninstalled %s" % self.spec.short_spec)
|
tty.msg("Successfully uninstalled %s" % self.spec.short_spec)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user