Bug 458474

Summary: PackageKit corrupting RPM DB
Product: [Fedora] Fedora Reporter: Martyn Hare <martynhare>
Component: PackageKitAssignee: Robin Norwood <robin.norwood>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: medium    
Version: 9CC: lmacken, martynhare, rhughes, richard
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-08-18 08:48:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Corrupted RPM DB sample - compressed with LZMA 4.32.5 none

Description Martyn Hare 2008-08-08 17:55:28 UTC
Created attachment 313823 [details]
Corrupted RPM DB sample - compressed with LZMA 4.32.5

PackageKit appears to be corrupting my RPM Database each time I install large quantities of packages in one go.  

This issue is reproduced by installing packages with a large number of dependencies, the same packages and dependencies being installed does not cause any issues when using Yum or YumEx as opposed to the Gnome PackageKit Application (gpk-application).

The result using PackageKit for large transactions is a corrupt RPM DB which requires:

rm /var/lib/rpm/__db*
rpmdb --rebuilddb

to fix.

Comment 1 Richard Hughes 2008-08-11 08:47:59 UTC
PackageKit uses the same code as using the yum cli -- it just wraps it in a bit of python and then schedules the transactions. Are you sure you can 100% trace this to PackageKit? I'm slightly confused why this would be the case.

Comment 2 Martyn Hare 2008-08-11 13:52:57 UTC
I have noticed that corruption(s) did occur when SELinux labels were wrong on the /var/lib/rpm directory and files inside it, but i'm not sure how they were wrong to begin with.  Also them not being what they were meant to be didn't trigger any messages on SETroubleshoot or any logs. 

I only realised they were different after running fixfiles -F relabel, when they had been changed.  My guess is bad labels caused it to fail multiple times, doesn't explain why yum worked each time but PK failed...

Anyway if no-one else (including me) experiences this in the next month or so i'd close the bug, since PK appears to not be breaking now i've made the changes.

Comment 3 Richard Hughes 2008-08-18 08:48:28 UTC
Okay, thanks.