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.
This commit is contained in:
parent
d9ddf2070c
commit
e549daa8ce
1 changed files with 4 additions and 5 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue