summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/solver/asp.py4
-rw-r--r--lib/spack/spack/util/mock_package.py3
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py
index bf64efa3ec..13bcfd2e91 100644
--- a/lib/spack/spack/solver/asp.py
+++ b/lib/spack/spack/solver/asp.py
@@ -1028,6 +1028,10 @@ class SpackSolverSetup(object):
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))
diff --git a/lib/spack/spack/util/mock_package.py b/lib/spack/spack/util/mock_package.py
index 4751f5af7e..5286b50464 100644
--- a/lib/spack/spack/util/mock_package.py
+++ b/lib/spack/spack/util/mock_package.py
@@ -102,6 +102,9 @@ class MockPackageMultiRepo(object):
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.