Skip to content

Commit

Permalink
Merge pull request #3119 from boiko/installcheck_duplicates_patchinfo
Browse files Browse the repository at this point in the history
Ignore patchinfo packages when checking for duplicated binaries
  • Loading branch information
dirkmueller committed Jul 8, 2024
2 parents 7797359 + 9866e35 commit a906506
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions osclib/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,8 @@ def binary_list(apiurl, project, repository, arch, package=None):


@memoize(session=True)
def package_binary_list(apiurl, project, repository, arch, package=None, strip_multibuild=True, exclude_src_debug=False):
def package_binary_list(apiurl, project, repository, arch, package=None, strip_multibuild=True, exclude_src_debug=False,
exclude_patchinfo=False):
path = ['build', project, repository, arch]
if package:
path.append(package)
Expand All @@ -257,6 +258,9 @@ def package_binary_list(apiurl, project, repository, arch, package=None, strip_m
if strip_multibuild:
package = package.split(':', 1)[0]

if exclude_patchinfo and package.startswith("patchinfo."):
continue

for binary in binary_list:
filename = binary.get('name')
result = re.match(RPM_REGEX, filename)
Expand Down Expand Up @@ -1002,7 +1006,8 @@ def duplicated_binaries_in_repo(apiurl, project, repository):
for arch in sorted(target_archs(apiurl, project, repository), reverse=True):
package_binaries, _ = package_binary_list(
apiurl, project, repository, arch,
strip_multibuild=False, exclude_src_debug=True)
strip_multibuild=False, exclude_src_debug=True,
exclude_patchinfo=True)
binaries = {}
for pb in package_binaries:
if pb.arch != 'noarch' and pb.arch != arch:
Expand Down

0 comments on commit a906506

Please sign in to comment.