summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/solver/asp.py6
-rw-r--r--lib/spack/spack/solver/concretize.lp5
2 files changed, 9 insertions, 2 deletions
diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py
index 5689bf4861..ed0109856f 100644
--- a/lib/spack/spack/solver/asp.py
+++ b/lib/spack/spack/solver/asp.py
@@ -1150,8 +1150,10 @@ class SpackSolverSetup(object):
value = variant.value
if isinstance(value, tuple):
for v in value:
+ if v == '*':
+ continue
clauses.append(f.variant(spec.name, vname, v))
- else:
+ elif value != '*':
clauses.append(f.variant(spec.name, vname, variant.value))
# compiler and compiler version
@@ -1424,7 +1426,7 @@ class SpackSolverSetup(object):
possible = spack.package.possible_dependencies(
*specs,
virtuals=self.possible_virtuals,
- deptype=("build", "link", "run")
+ deptype=("build", "link", "run", "test")
)
pkgs = set(possible)
diff --git a/lib/spack/spack/solver/concretize.lp b/lib/spack/spack/solver/concretize.lp
index e495db4664..77bc45bcde 100644
--- a/lib/spack/spack/solver/concretize.lp
+++ b/lib/spack/spack/solver/concretize.lp
@@ -194,6 +194,11 @@ variant_default_value(Package, Variant, Value)
variant_default_value(Package, Variant, Value)
:- variant_default_value_from_packages_yaml(Package, Variant, Value).
+% Treat 'none' in a special way - it cannot be combined with other
+% values even if the variant is multi-valued
+:- 2 {variant_value(Package, Variant, Value): variant_possible_value(Package, Variant, Value)},
+ variant_value(Package, Variant, "none").
+
% suppress warnings about this atom being unset. It's only set if some
% spec or some package sets it, and without this, clingo will give
% warnings like 'info: atom does not occur in any rule head'.