Re-add --best to repoclosure#436
Conversation
Without --best, dnf repoclosure can silently resolve a Requires against an older, still-present package instead of the newest one, masking real reverse-dependency breaks at PR time (e.g. theforeman/foreman-packaging#13647 bumping rubygem-foreman-tasks to 13.0.0 while rubygem-foreman_ansible still required < 13 — per-PR repoclosure passed, the break only surfaced via staging repoclosure the next day and was fixed in #13661). --best was dropped in theforeman#246 (2020) because it broke EL8 module repoclosure. module_hotfixes=1, since added to the modular repos in foreman-packaging's yum.conf, already neutralizes that problem. Verified: with a local dnf4 (CentOS Stream 9, matching this project's own container) reproduction using synthetic RPMs mirroring the foreman-tasks/foreman_ansible incident, --best correctly flags the break that is otherwise silently missed. Re-checked today's real el8-foreman-client and el9-foreman-plugins staging targets with their full lookaside sets and got clean, unaffected results. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
That explanation is bullshit. Repoclosure "just doesn't work" with modules properly, as it has no way to know which module needs to be enabled and which not. Setting I am all for enabling |
I'll write the one about parrot down. That's a great parallel! I verify most of the LLM output, but I rushed with this one without actually verifying what it says. So, next time. Maybe in #437? 😉 |
Summary
Without
--best,dnf repoclosurecan silently resolve aRequiresagainst an older, still-present package instead of the newest one — masking real reverse-dependency breaks at PR time instead of failing loudly.Real-world case: theforeman/foreman-packaging#13647 bumped
rubygem-foreman-tasksto 13.0.0 whilerubygem-foreman_ansiblestill hadRequires: (rubygem(foreman-tasks) >= 10.0 with rubygem(foreman-tasks) < 13). Per-PR COPR repoclosure passed anyway. The break wasn't caught until staging repoclosure ran the next day, fixed in theforeman/foreman-packaging#13661 (and its DEB-side twin, theforeman/foreman-packaging#13688).--bestwas originally dropped in #246 (2020) because it broke EL8 module repoclosure (module_hotfixeswasn't respected).module_hotfixes=1has since been added to the modular repos inforeman-packaging'srepoclosure/yum.conf, which already neutralizes that problem — so the original reason for dropping--bestno longer applies.Verification
Reproduced the actual incident with synthetic RPMs mirroring the
foreman-tasks/foreman_ansibleversions involved, run through the real dnf4 client (CentOS Stream 9, matching this project's ownDockerfile— not dnf5, whoserepoclosure --bestis a no-op alias for--newestand would give a false read here):--best:dnf repoclosureexits0— silently passes, reproducing the real miss.--best: exits1and correctly reports the unresolvedrubygem(foreman-tasks) < 13dependency.Also re-ran today's real
el8-foreman-client-nightly-stagingandel9-foreman-plugins-nightly-stagingtargets (with their full lookaside sets) with--best— clean, no new false positives.tests/test_functional.pyupdated to expect--bestin the generateddnf repoclosurecommand. Full suite: 126 passed.Related
foreman-packaging'spackage_manifest.yaml— no obal-side gap there.