allow external packages that violate conflicts (#18183)
This commit is contained in:
parent
573ce3fe81
commit
ad9cd25285
@ -2330,6 +2330,10 @@ def concretize(self, tests=False):
|
|||||||
# TODO: internal configuration conflicts within one package.
|
# TODO: internal configuration conflicts within one package.
|
||||||
matches = []
|
matches = []
|
||||||
for x in self.traverse():
|
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():
|
for conflict_spec, when_list in x.package_class.conflicts.items():
|
||||||
if x.satisfies(conflict_spec, strict=True):
|
if x.satisfies(conflict_spec, strict=True):
|
||||||
for when_spec, msg in when_list:
|
for when_spec, msg in when_list:
|
||||||
|
@ -500,6 +500,12 @@ def test_conflicts_in_spec(self, conflict_spec):
|
|||||||
with pytest.raises(exc_type):
|
with pytest.raises(exc_type):
|
||||||
s.concretize()
|
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):
|
def test_regression_issue_4492(self):
|
||||||
# Constructing a spec which has no dependencies, but is otherwise
|
# Constructing a spec which has no dependencies, but is otherwise
|
||||||
# concrete is kind of difficult. What we will do is to concretize
|
# concrete is kind of difficult. What we will do is to concretize
|
||||||
|
Loading…
Reference in New Issue
Block a user