Bug 2077864
| Summary: | "dnf download" does not randomly redownload a broken package | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Eva Mrakova <emrakova> |
| Component: | librepo | Assignee: | amatej |
| Status: | CLOSED ERRATA | QA Contact: | Eva Mrakova <emrakova> |
| Severity: | medium | Docs Contact: | Mariya Pershina <mpershin> |
| Priority: | medium | ||
| Version: | 8.7 | CC: | amatej, james.antill, mbanas, packaging-team-maint, ppisar, swm-qe |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | librepo-1.14.2-2.el8 | Doc Type: | No Doc Update |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 2077859 | Environment: | |
| Last Closed: | 2022-11-08 10:54:34 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: | |||
|
Comment 1
Petr Pisar
2022-04-25 11:58:29 UTC
I managed to reproduce it even on fedora. I am pretty sure the problem is that since https://github.com/rpm-software-management/dnf/pull/1743 dnf uses librepo for checksum checking which uses caching. Basically dnf downloads the package and stores (caches) its checksum and mtime to xattrs of the file then when the computer is fast enough (only sometimes) it rewrites the file with "blah" in the same mtime. On the next run dnf compares the file mtime with cached mtime and since they match it uses the cached (wrong) checksum -> no redownload. To workaround this you can: 2. for i in {1..10}; do echo blah > bash-5.1.8-4.el9.x86_64.rpm ; dnf download bash; sleep 1s; done I have created a PR that should resolve this: https://github.com/rpm-software-management/librepo/pull/256 PR with CI tests: https://github.com/rpm-software-management/ci-dnf-stack/pull/1096 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 (librepo 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/RHBA-2022:7780 |