Relax conflict checks for externals (#6907)

This updates the conflict-checking logic to require that the conflict
spec matches exactly and that all fields mentioned in the conflict
spec are present in the concretized spec in order to report a
conflict. This will automatically skip all conflict checks for
dependencies of externals (since externals strip dependencies). This
will not affect non-external packages since all fields and
dependencies are fully specified for such packages.
This commit is contained in:
scheibelp 2018-01-12 10:53:11 -08:00 committed by GitHub
parent 9e3f8c0d79
commit f4101550d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1869,9 +1869,9 @@ def concretize(self):
matches = []
for x in self.traverse():
for conflict_spec, when_list in x.package.conflicts.items():
if x.satisfies(conflict_spec):
if x.satisfies(conflict_spec, strict=True):
for when_spec, msg in when_list:
if x.satisfies(when_spec):
if x.satisfies(when_spec, strict=True):
matches.append((x, conflict_spec, when_spec, msg))
if matches:
raise ConflictsInSpecError(self, matches)