summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2017-03-28 08:43:15 -0700
committerGitHub <noreply@github.com>2017-03-28 08:43:15 -0700
commite549daa8ce1d928032411817bfbafa527d9396c1 (patch)
tree3a261ffbcf8823f4d1d88ae0156b4e58170af1ea /lib
parentd9ddf2070cc0961b7ec0803ec6d9a24156314c91 (diff)
downloadspack-e549daa8ce1d928032411817bfbafa527d9396c1.tar.gz
spack-e549daa8ce1d928032411817bfbafa527d9396c1.tar.bz2
spack-e549daa8ce1d928032411817bfbafa527d9396c1.tar.xz
spack-e549daa8ce1d928032411817bfbafa527d9396c1.zip
Bugfix: allow deactivating installs that don't have packages anymore. (#3572)
- deactivate -a wouldn't work if the installation's package was no longer available. - Fix installed_extensions_for so that it doesn't need to look at the package.py file.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/database.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py
index d3fc03fb40..c81512d682 100644
--- a/lib/spack/spack/database.py
+++ b/lib/spack/spack/database.py
@@ -619,13 +619,12 @@ class Database(object):
Return the specs of all packages that extend
the given spec
"""
- for s in self.query():
+ for spec in self.query():
try:
- if s.package.extends(extendee_spec):
- yield s.package
- except spack.repository.UnknownPackageError:
+ spack.store.layout.check_activated(extendee_spec, spec)
+ yield spec.package
+ except spack.directory_layout.NoSuchExtensionError:
continue
- # skips unknown packages
# TODO: conditional way to do this instead of catching exceptions
def query(self, query_spec=any, known=any, installed=True, explicit=any):