Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Commit

Permalink
Fix an issue that gen-payload may report a wrong dg_key
Browse files Browse the repository at this point in the history
See https://coreos.slack.com/archives/GDBRP5YJH/p1661487393053669?thread_ts=1661448640.797759&cid=GDBRP5YJH

This issue happened because variable `dgk` was accidentally
overwritten by another variable for a loop.
  • Loading branch information
vfreex committed Aug 26, 2022
1 parent 3e75522 commit f72106f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doozerlib/assembly_inspector.py
Expand Up @@ -221,7 +221,7 @@ def check_group_image_consistency(self, build_inspector: BrewBuildImageInspector
"""
el_ver = build_inspector.get_rhel_base_version()
if el_ver: # We might not find an el_ver for an image (e.g. FROM scratch)
for dgk, assembly_rpm_build in self.get_group_rpm_build_dicts(el_ver).items():
for rpm_dgk, assembly_rpm_build in self.get_group_rpm_build_dicts(el_ver).items():
if not assembly_rpm_build:
# The RPM doesn't claim to build for this image's RHEL base, so ignore it.
continue
Expand All @@ -230,7 +230,7 @@ def check_group_image_consistency(self, build_inspector: BrewBuildImageInspector
if package_name in installed_packages:
installed_nvr = installed_packages[package_name]['nvr']
if installed_nvr != assembly_nvr:
issues.append(AssemblyIssue(f'Expected image to contain assembly RPM build {assembly_nvr} but found {installed_nvr} installed', component=dgk, code=AssemblyIssueCode.CONFLICTING_GROUP_RPM_INSTALLED))
issues.append(AssemblyIssue(f'Expected image to contain assembly RPM build {assembly_nvr} but found {installed_nvr} installed', component=rpm_dgk, code=AssemblyIssueCode.CONFLICTING_GROUP_RPM_INSTALLED))

"""
Assess whether the image build has the upstream
Expand Down

0 comments on commit f72106f

Please sign in to comment.