diff options
author | Greg Becker <becker33@llnl.gov> | 2020-08-20 10:16:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-20 10:16:48 -0700 |
commit | ad9cd2528543b588e2a6c2585e10bc54b24c6302 (patch) | |
tree | 8d231379c03766c556d9e887d4147eea24b7c485 /lib | |
parent | 573ce3fe81b1a11443dc678b3e225e7959943604 (diff) | |
download | spack-ad9cd2528543b588e2a6c2585e10bc54b24c6302.tar.gz spack-ad9cd2528543b588e2a6c2585e10bc54b24c6302.tar.bz2 spack-ad9cd2528543b588e2a6c2585e10bc54b24c6302.tar.xz spack-ad9cd2528543b588e2a6c2585e10bc54b24c6302.zip |
allow external packages that violate conflicts (#18183)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/spec.py | 4 | ||||
-rw-r--r-- | lib/spack/spack/test/concretize.py | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 047764c8ae..cc2d5ca552 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -2330,6 +2330,10 @@ class Spec(object): # TODO: internal configuration conflicts within one package. matches = [] for x in self.traverse(): + if x.external: + # external specs are already built, don't worry about whether + # it's possible to build that configuration with Spack + continue for conflict_spec, when_list in x.package_class.conflicts.items(): if x.satisfies(conflict_spec, strict=True): for when_spec, msg in when_list: diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py index a7a89cc78d..94770ad5f8 100644 --- a/lib/spack/spack/test/concretize.py +++ b/lib/spack/spack/test/concretize.py @@ -500,6 +500,12 @@ class TestConcretize(object): with pytest.raises(exc_type): s.concretize() + def test_no_conflixt_in_external_specs(self, conflict_spec): + # clear deps because external specs cannot depend on anything + ext = Spec(conflict_spec).copy(deps=False) + ext.external_path = '/fake/path' + ext.concretize() # failure raises exception + def test_regression_issue_4492(self): # Constructing a spec which has no dependencies, but is otherwise # concrete is kind of difficult. What we will do is to concretize |