Ignore current Factory duplicates

This commit is contained in:
Stephan Kulow 2019-05-29 20:31:28 +02:00
parent 36387007d1
commit 195bb65b48
2 changed files with 8 additions and 0 deletions

View File

@ -160,6 +160,7 @@ DEFAULT = {
'staging-archs': '',
'staging-dvd-archs': '',
'staging-required-checks-adi': '',
'installcheck-ignore-duplicated-binaries': '',
'onlyadi': '',
'rings': '',
'nonfree': '',

View File

@ -71,6 +71,7 @@ class InstallChecker(object):
self.calculate_allowed_cycles()
self.existing_problems = self.binary_list_existing_problem(api.project, api.cmain_repo)
self.ignore_duplicated = set(self.config.get('installcheck-ignore-duplicated-binaries', '').split(' '))
def check_required_by(self, fileinfo, provides, requiredby, built_binaries, comments):
if requiredby.get('name') in built_binaries:
@ -233,6 +234,12 @@ class InstallChecker(object):
result = False
duplicates = duplicated_binaries_in_repo(self.api.apiurl, project, repository)
# remove white listed duplicates
for arch in list(duplicates):
for binary in self.ignore_duplicated:
duplicates[arch].pop(binary, None)
if not len(duplicates[arch]):
del duplicates[arch]
if len(duplicates):
self.logger.warning('Found duplicated binaries')
result_comment.append(yaml.dump(duplicates, default_flow_style=False))