Bug 1833074
Summary: | reposync --newest-only does not download the latest package | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | jcastran | |
Component: | yum | Assignee: | Marek Blaha <mblaha> | |
Status: | CLOSED ERRATA | QA Contact: | Luca Berton <lberton> | |
Severity: | urgent | Docs Contact: | ||
Priority: | urgent | |||
Version: | 8.2 | CC: | james.antill, jazzn1doog, jblazek, jinjli, jwboyer, kmoriguc, ktordeur, kwalker, lberton, lekang, lisas, marjones, mblaha, mkenjale, nlager, nsella, ofalk, packaging-team-maint, ppisar, releng-maint-list, rmetrich, rnargund, sct | |
Target Milestone: | rc | Keywords: | Triaged, ZStream | |
Target Release: | 8.0 | |||
Hardware: | All | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | dnf-plugins-core-4.0.17-5.el8 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1870265 (view as bug list) | Environment: | ||
Last Closed: | 2020-11-04 01:53:12 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | 1783238, 1783244 | |||
Bug Blocks: | 1870265 |
Description
jcastran
2020-05-07 18:26:59 UTC
Hey Marek, i'm trying to understand the problem as you have commented above if you could help to correct my understanding: "The problem here is that newer module versions contains packages with older NEVRAs" - Sounds like we will need to adjust this so the older ones are not showing up "So in the end the newest rhnsd package (by NEVRA - that is what yumdownloader is trying to download) is contained in older version of the module (which was not downloaded by reposync)." - rhnsd-0:5.0.35-3.module+el8+2754+6a08e8f4.x86_64 is contained in older version rhnsd-0:5.0.35-3.module+el8.0.0.z+3494+e6f475f6.x86_64 but this older module is not downloaded causing this issue. Is this understanding correct? The problem here is that `reposync -n` and `yum download` use different algorithms to recognize what is latest: - reposync downloads artifacts from the latest module version (so it downloads rhnsd-0:5.0.35-3.module+el8.1.0+3455+3ddf2832.x86_64 from satellite-5-client module version 8010020190621091459) - on the other hand `yum download` downloads the package with the highest NEVRA available (rhnsd-5.0.35-3.module+el8+2754+6a08e8f4.x86_64.rpm because this NEVRA is after the `+el8+ -> +el.8.Y.Z+` change in the release number scheme the highest one). And it is not only the download command. Also `install` command will try to "upgrade" the rhnsd package: # dnf install rhnsd Updating Subscription Management repositories. Last metadata expiration check: 0:20:26 ago on Tue Jul 21 03:28:52 2020. Package rhnsd-5.0.35-3.module+el8.1.0+3455+3ddf2832.x86_64 is already installed. Dependencies resolved. ====================================================================================================== Package Arch Version Repository Size ====================================================================================================== Upgrading: rhnsd x86_64 5.0.35-3.module+el8+2754+6a08e8f4 rhel-8-for-x86_64-appstream-rpms 51 k Transaction Summary ====================================================================================================== Upgrade 1 Package There are 2 workarounds for this issue. 1. Do not use the -n (--newest) flag. This will result in the download of every package in that repository and an increased storage requirement. The full size can be seen with "yum repolist -v" Repo-id : rhel-8-for-x86_64-appstream-rpms Repo-size : 25 G Repo-id : rhel-8-for-x86_64-baseos-rpms Repo-size : 6.2 G 2. After using "reposync -n --download-metadata --repo=<repo-id>", when a package is identified, you can download the latest and put it in the repository with no further changes. The repodata already thinks the package is there. Using rhsnd as my example. # yumdownloader rhnsd # mv rhnsd-5.0.35-3.module+el8+2754+6a08e8f4.x86_64.rpm <repo-id>/Packages/r/ Here is PR with reposync fix: https://github.com/rpm-software-management/dnf-plugins-core/pull/407 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (yum bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2020:4510 |