Bug 79515

Summary: Offline update keeps trying to update nonexistent packages
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] Simplify prepared updates file creation

Description Kalev Lember 2014-06-01 20:57:22 UTC
After using yum or rpm to install updates, gnome-software often keeps on offering those old updates again. And it doesn't give up; even after clicking refresh on the updates page it still shows the old (already installed) updates.

I've traced this to the pk systemd updates plugin that goes to a lot of trouble to _append_ to the prepared-update file instead of creating it from scratch. This means old entries never disappear, even if they are invalid.

Attaching a patch that I did two weeks ago, but I cannot remember any more why I didn't submit it back then; there might have been something wrong with this approach :-) In any case, it seems to work fine in my testing today, with several repositories enabled.
Comment 1 Kalev Lember 2014-06-01 20:58:34 UTC
Created attachment 100252 [details] [review]
[PATCH] Simplify prepared updates file creation

Instead of reading back in the old prepared updates file and then
carefully appending any new updates, just write the new file from
scratch. It's easier to do so and makes sure we won't get stale entries
in the prepared update file.
Comment 2 Kalev Lember 2014-06-03 08:59:32 UTC
Pushed to master and PACKAGEKIT_0_9_X 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.