| Summary: | hy_package_get_hdr_chksum() fails for some installed packages | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Richard Hughes <rhughes> | ||||
| Component: | libsolv | Assignee: | Radek Holy <rholy> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 20 | CC: | akozumpl, jzeleny, lnie, mls, packaging-team-maint, pnemade, rholy | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | libsolv-0.4.1-0.gita8e47f1.fc20 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2013-12-20 02:06:35 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: | |||||
| Attachments: |
|
||||||
Thanks for the report Richard. Radek does this sound familiar considering what you are chasing in bug 1039415? Yes, I am pretty sure this bug is the cause of the bug 1039415. Assigning to Radek. Radek---ask if you get in trouble/have questions. It is possible libsolv is reading wrong data from rpmdb, in that case show the bug to Michael (mls) with as much information as possible, preferably with a reproducer. He has no obligation to fix libsolv bugs we find but is always very helpful. Radek tells me that reverting 61355e53 in hawkey helps, the change was to use repo_add_rpmdb_reffp() instead of plain repo_add_rpmdb() when re-reading rpmdb. Likely a libsolv bug. CCing Michael. Found and fixed by mls in upstream libsolv:
commit a8e47f15b81002c721fe164885d809562c5d3e7a
Author: Michael Schroeder <mls>
Date: Mon Dec 16 15:57:11 2013 +0100
Also copy the checksums in repo_add_rpmdb_reffp
Sorry. Also bumps the RPMDB_COOKIE_VERSION so old broken solv
files don't get reused.
:100644 100644 16457db... 9d6d830... M ext/repo_rpmdb.c
libsolv-0.4.1-0.gita8e47f1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/libsolv-0.4.1-0.gita8e47f1.fc20 *** Bug 1039415 has been marked as a duplicate of this bug. *** Package libsolv-0.4.1-0.gita8e47f1.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing libsolv-0.4.1-0.gita8e47f1.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-23509/libsolv-0.4.1-0.gita8e47f1.fc20 then log in and leave karma (feedback). libsolv-0.4.1-0.gita8e47f1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. |
Created attachment 835970 [details] small reproducer Description of problem: PackageKit uses hy_package_get_hdr_chksum() to work out the package ID so that it can remove the yumdb database entry when a package is removed. For the yumdb, the index is the rpm checksum of the header. When removing packages, there's about a 1/10 chance that the chosen package will fail, although I've not worked out what makes some packages have a checksum, and others notso. Feel free to tell me I'm a moron if I'm misusing the API somehow. Version-Release number of selected component (if applicable): hawkey-0.4.6-1.fc20.x86_64 How reproducible: Mostly. I've attached a small reproducer which you might have to tweak for your system which always fails to get the ID. Steps to Reproduce: 1. gcc -o hy hy.c `pkg-config --cflags --libs hawkey` 2. ./hy Actual results: LOOKING FOR rhythmbox NO HDR CHECKSUM for rhythmbox Expected results: LOOKING FOR rhythmbox CHECKSUM xxxxxxxxxxxxxxxxxxxxxxxx