Fix rpm_packages.unique_version to detect cross-arch RPM mismatches #1617
+126
−19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The unique_version rule was failing to detect RPM version differences
across architectures in multi-arch builds. The root cause was that each
arch-specific SBOM contains RPM entries for ALL architectures (from the
rpm lockfile), not just the packages actually installed on that platform.
When comparing platforms, the rule saw identical RPM sets because every
SBOM included the full lockfile. For example, the x86_64 SBOM contained
both tar-1.35-9.el10_1 (installed) and tar-1.35-7.el10 (lockfile entry
for arm64), making all platforms appear to have the same versions.
The fix filters RPMs to only include those with a "distro" qualifier,
which indicates the package is actually installed. Lockfile entries use
"repository_id" and "checksum" qualifiers instead, allowing us to
distinguish between installed packages and lockfile metadata.
Assisted-by: Claude opus 4.5
https://issues.redhat.com/browse/EC-1608