From 36fbd6cf4cce68424bdea92a8426ddcfce922595 Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Wed, 7 Aug 2019 18:34:41 -0700 Subject: [PATCH] bugfix: spack stacks mixed dependency and non-dep constraints (#12315) Spack stacks drop invalid dependencies applied to packages by a spec_list matrix operation Without this fix, Spack would raise an error if orthogonal dependency constraints and non-dependency constraints were applied to the same package by a matrix and the dependency constraint was invalid for that package. This is an error, fixed by this PR. An example failing configuration: spack: definitions: - packages: [libelf, hdf5+mpi] - compilers: ['%gcc'] - mpis: [^openmpi] specs: - matrix: - $packages - $compilers - $mpis --- lib/spack/spack/environment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/environment.py b/lib/spack/spack/environment.py index 0e59cba746..86b88b8a51 100644 --- a/lib/spack/spack/environment.py +++ b/lib/spack/spack/environment.py @@ -1346,7 +1346,7 @@ def _concretize_from_constraints(spec_constraints): for d in invalid_msg.split() if d != 'or'] invalid_deps = [c for c in spec_constraints - if any(c.satisfies(invd) + if any(c.satisfies(invd, strict=True) for invd in invalid_deps_string)] if len(invalid_deps) != len(invalid_deps_string): raise e