fixed installed dependents and uninstall error message
This commit is contained in:
parent
d224718d96
commit
2aa859e0cf
1 changed files with 3 additions and 5 deletions
|
@ -543,9 +543,7 @@ def installed_dependents(self):
|
|||
dependents = []
|
||||
for spec in spack.db.installed_package_specs():
|
||||
if self.name in spec.dependencies:
|
||||
dep_spec = spec.dependencies[self.name]
|
||||
if self.spec == dep_spec:
|
||||
dependents.append(dep_spec)
|
||||
dependents.append(spec)
|
||||
return dependents
|
||||
|
||||
|
||||
|
@ -772,8 +770,8 @@ def do_uninstall(self):
|
|||
if not self.ignore_dependencies:
|
||||
deps = self.installed_dependents
|
||||
if deps: tty.die(
|
||||
"Cannot uninstall %s. The following installed packages depend on it:"
|
||||
% self.name, " ".join(deps))
|
||||
"Cannot uninstall %s. The following installed packages depend on it: %s"
|
||||
% (self.name, deps))
|
||||
|
||||
self.remove_prefix()
|
||||
tty.msg("Successfully uninstalled %s." % self.name)
|
||||
|
|
Loading…
Reference in a new issue