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 @@ def installed_extensions_for(self, extendee_spec): 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):