Skip to content

Fix prefix matching in process_repomd NVRA alias lookup#81

Merged
brianclemens merged 1 commit into
resf:mainfrom
rockythorn:fix/process-repomd-prefix-matching
May 21, 2026
Merged

Fix prefix matching in process_repomd NVRA alias lookup#81
brianclemens merged 1 commit into
resf:mainfrom
rockythorn:fix/process-repomd-prefix-matching

Conversation

@rockythorn

Copy link
Copy Markdown
Collaborator

Summary

  • process_repomd() prefix matching stored raw NVRAs in its package name map but used them to look up packages in a cleaned-NVRA-keyed dict, so the lookup always failed silently for packages with Rocky-specific release suffixes (e.g. .rocky.0.1)
  • Renamed raw_package_map to pkg_name_map and changed it to store cleaned NVRAs, matching the pattern already used correctly in clone_advisory()
  • This fixes advisory cloning for any package where the Rocky release string differs from the Red Hat original (e.g. openssh)

Closes #80

Test plan

  • Reproduced locally: ran RhMatcherWorkflow, confirmed RHSA-2026:13381 logged "No matching packages found" across all mirrors
  • Added debug logging at prefix match and alias lookup stages, confirmed alias pointed to raw NVRA that didn't exist in cleaned-keyed dict
  • Applied fix, re-ran RhMatcherWorkflow, confirmed "Found packages for RHSA-2026:13381" and "Cloning advisory RHSA-2026:13381 to Rocky Linux"
  • Verified RLSA-2026:13381 created successfully with packages across all architectures (x86_64, aarch64, s390x, ppc64le)

@rockythorn rockythorn force-pushed the fix/process-repomd-prefix-matching branch from 4dee213 to 485b99c Compare May 20, 2026 22:34
…eaned-keyed dict

The pkg_name_map (formerly raw_package_map) stored raw NVRAs but was
used to create aliases looked up in raw_pkg_nvras, which is keyed by
cleaned NVRAs. For packages with Rocky-specific release suffixes (e.g.
.rocky.0.1), the raw value includes the dist tag (.el9_7) while the
cleaned key does not, so the lookup always failed silently.

This broke advisory cloning for any package where the Rocky release
string differs from the Red Hat original, such as openssh. The
equivalent map in clone_advisory (pkg_name_map) already stores cleaned
NVRAs correctly.

Also deduplicates cleaned NVRAs in pkg_name_map to avoid redundant
prefix matching iterations from module stream rebuilds.
@rockythorn rockythorn force-pushed the fix/process-repomd-prefix-matching branch from 485b99c to 655f36a Compare May 20, 2026 22:39
@brianclemens brianclemens merged commit 42ce9e6 into resf:main May 21, 2026
1 check passed
@rockythorn rockythorn deleted the fix/process-repomd-prefix-matching branch May 21, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Apollo Not Cloning RHSA-2026:13381

2 participants