summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2014-07-08 02:36:40 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2014-07-08 02:36:40 -0700
commit830b9ab25c27dc2bd6bbb57c5299a84332ff4f7e (patch)
treeab3e774e3c4dc13473b224d404254a11288463bd /lib
parent10318a11dded5e69c3d9c98325613700c9b3db63 (diff)
downloadspack-830b9ab25c27dc2bd6bbb57c5299a84332ff4f7e.tar.gz
spack-830b9ab25c27dc2bd6bbb57c5299a84332ff4f7e.tar.bz2
spack-830b9ab25c27dc2bd6bbb57c5299a84332ff4f7e.tar.xz
spack-830b9ab25c27dc2bd6bbb57c5299a84332ff4f7e.zip
Fix for finding dependent packages
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/package.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py
index f45ddeaa6d..79a6c2362e 100644
--- a/lib/spack/spack/package.py
+++ b/lib/spack/spack/package.py
@@ -496,7 +496,7 @@ class Package(object):
on this one."""
dependents = []
for spec in spack.db.installed_package_specs():
- if self in spec.dependencies:
+ if self.spec != spec and self.spec in spec:
dependents.append(spec)
return dependents
@@ -738,8 +738,9 @@ class Package(object):
deps = self.installed_dependents
formatted_deps = [s.format('$_$@$%@$+$=$#') for s in deps]
if deps: raise InstallError(
- "Cannot uninstall %s. The following installed packages depend on it: %s"
- % (self.spec, formatted_deps))
+ "Cannot uninstall %s." % self.spec,
+ "The following installed packages depend on it: %s" %
+ ' '.join(formatted_deps))
self.remove_prefix()
tty.msg("Successfully uninstalled %s." % self.spec)