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
@ -619,13 +619,12 @@ def installed_extensions_for(self, extendee_spec):
|
|||||||
Return the specs of all packages that extend
|
Return the specs of all packages that extend
|
||||||
the given spec
|
the given spec
|
||||||
"""
|
"""
|
||||||
for s in self.query():
|
for spec in self.query():
|
||||||
try:
|
try:
|
||||||
if s.package.extends(extendee_spec):
|
spack.store.layout.check_activated(extendee_spec, spec)
|
||||||
yield s.package
|
yield spec.package
|
||||||
except spack.repository.UnknownPackageError:
|
except spack.directory_layout.NoSuchExtensionError:
|
||||||
continue
|
continue
|
||||||
# skips unknown packages
|
|
||||||
# TODO: conditional way to do this instead of catching exceptions
|
# TODO: conditional way to do this instead of catching exceptions
|
||||||
|
|
||||||
def query(self, query_spec=any, known=any, installed=True, explicit=any):
|
def query(self, query_spec=any, known=any, installed=True, explicit=any):
|
||||||
|
Loading…
Reference in New Issue
Block a user