Fix bug in spack find
for installations with unknown namespaces. (#3573)
- Spack find would fail with "unknown namespace" for some queries when a package from an unknown namespace was installed. - Solve by being conservative: assume unknown packages are NOT providers of virtual dependencies.
This commit is contained in:
parent
e549daa8ce
commit
782f29bc4b
@ -2166,7 +2166,13 @@ def satisfies(self, other, deps=True, strict=False, strict_deps=False):
|
||||
|
||||
# A concrete provider can satisfy a virtual dependency.
|
||||
if not self.virtual and other.virtual:
|
||||
pkg = spack.repo.get(self.fullname)
|
||||
try:
|
||||
pkg = spack.repo.get(self.fullname)
|
||||
except spack.repository.PackageLoadError:
|
||||
# If we can't get package info on this spec, don't treat
|
||||
# it as a provider of this vdep.
|
||||
return False
|
||||
|
||||
if pkg.provides(other.name):
|
||||
for provided, when_specs in pkg.provided.items():
|
||||
if any(self.satisfies(when_spec, deps=False, strict=strict)
|
||||
|
Loading…
Reference in New Issue
Block a user