fixed installed dependents and uninstall error message

This commit is contained in:
Gregory L. Lee 2014-03-17 15:55:15 -07:00 committed by Todd Gamblin
parent d224718d96
commit 2aa859e0cf

View file

@ -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)