From e549daa8ce1d928032411817bfbafa527d9396c1 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Tue, 28 Mar 2017 08:43:15 -0700 Subject: 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. --- lib/spack/spack/database.py | 9 ++++----- 1 file 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): -- cgit v1.2.3-70-g09d2