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.
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.
Pushed to master and PACKAGEKIT_0_9_X after IRC review.