From 2aa859e0cf8348eb6602ae2a267852596b194d61 Mon Sep 17 00:00:00 2001 From: "Gregory L. Lee" Date: Mon, 17 Mar 2014 15:55:15 -0700 Subject: [PATCH] fixed installed dependents and uninstall error message --- lib/spack/spack/package.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index b3f2b1857d..f949f2ef57 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -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)