Bug 79791

Summary: Offline update results are almost always empty
Product: PackageKit Reporter: Kalev Lember <kalevlember>
Component: backend-yumAssignee: Richard Hughes <richard>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: [PATCH] hawkey: Correctly set the cleanup status
[PATCH] hawkey: Correctly set the cleanup status

Description Kalev Lember 2014-06-08 12:19:38 UTC
With the hawkey backend, offline-update-competed almost always has an empty Packages= list. It only seems to include packages that are installed, but never those that are being updated.

I've added a bunch of debug locally to find out what's going wrong there and I believe I've figured out the root cause.
Comment 1 Kalev Lember 2014-06-08 12:25:04 UTC
Created attachment 100650 [details] [review]
[PATCH] hawkey: Correctly set the cleanup status

We were wrongly setting the cleanup status not on the removed package,
but on the one that got installed as a replacement.

-- 

This applies to the PACKAGEKIT_0_9_X branch; the code on master seems to differ quite a bit.
Comment 2 Kalev Lember 2014-06-08 12:53:32 UTC
Created attachment 100652 [details] [review]
[PATCH] hawkey: Correctly set the cleanup status

Minor improvement to the first patch after I read hawkey code and realised that hy_package_link just increases the refcount.
Comment 3 Kalev Lember 2014-06-10 09:03:37 UTC
Pushed this to both PACKAGEKIT_0_9_X and libhif master after IRC review.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.