bugfix: work around issue handling packages not in any repo
This commit is contained in:
parent
1343a815c0
commit
98c2627132
2 changed files with 7 additions and 0 deletions
|
@ -1028,6 +1028,10 @@ def external_packages(self):
|
|||
if pkg_name == 'all':
|
||||
continue
|
||||
|
||||
# This package does not appear in any repository
|
||||
if pkg_name not in spack.repo.path:
|
||||
continue
|
||||
|
||||
if 'externals' not in data:
|
||||
self.gen.fact(fn.external(pkg_name).symbol(positive=False))
|
||||
|
||||
|
|
|
@ -102,6 +102,9 @@ def repo_for_pkg(self, name):
|
|||
Repo = collections.namedtuple('Repo', ['namespace'])
|
||||
return Repo('mockrepo')
|
||||
|
||||
def __contains__(self, item):
|
||||
return item in self.spec_to_pkg
|
||||
|
||||
def add_package(self, name, dependencies=None, dependency_types=None,
|
||||
conditions=None):
|
||||
"""Factory method for creating mock packages.
|
||||
|
|
Loading…
Reference in a new issue