bugfix: work around issue handling packages not in any repo
This commit is contained in:
parent
0e725f0ab1
commit
30a9e6462f
@ -1028,6 +1028,10 @@ def external_packages(self):
|
|||||||
if pkg_name == 'all':
|
if pkg_name == 'all':
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# This package does not appear in any repository
|
||||||
|
if pkg_name not in spack.repo.path:
|
||||||
|
continue
|
||||||
|
|
||||||
if 'externals' not in data:
|
if 'externals' not in data:
|
||||||
self.gen.fact(fn.external(pkg_name).symbol(positive=False))
|
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'])
|
Repo = collections.namedtuple('Repo', ['namespace'])
|
||||||
return Repo('mockrepo')
|
return Repo('mockrepo')
|
||||||
|
|
||||||
|
def __contains__(self, item):
|
||||||
|
return item in self.spec_to_pkg
|
||||||
|
|
||||||
def add_package(self, name, dependencies=None, dependency_types=None,
|
def add_package(self, name, dependencies=None, dependency_types=None,
|
||||||
conditions=None):
|
conditions=None):
|
||||||
"""Factory method for creating mock packages.
|
"""Factory method for creating mock packages.
|
||||||
|
Loading…
Reference in New Issue
Block a user