GNOME Bugzilla – Bug 726645
post-update experience is bad
Last modified: 2014-03-20 00:45:59 UTC
I just installed an offline update (successfully, there is /var/lib/PackageKit/offline-update-completed), and after reboot and login, I see a 'updates available' notification hiding in the message tray. While I was looking at that, the 'updates installed' notification popped in. I clicked on it, and was presented with 'Checking for updates' and a spinner in gnome-software. That went on for multiple minutes, so I eventually clicked on the 'updates [4]' tab (no tab was selected before), and that immediately brought up 'All uptodate'. Attempts to run gnome-software --mode=updated didn't succeed in seeing the contents of the (still available) offline-update-completed file either.
GNotifications seem to persist over reboots and I couldn't find any API to remove them. I am not sure that persistent notifications are desirable here at all; they seem to get out of date pretty quickly. I wonder if notifications are even necessary now that gnome-shell has the option to install updates in the shutdown dialog. In any case, I guess an additional thing gnome-shell should do when triggering update installation, is to update org.gnome.software install-timestamp setting, so that gnome-software wouldn't offer updates again any time soon. Or maybe gnome-software should set it itself, when it finds the offline-update-completed file?
I've asked around on IRC and there is API to remove notifications. It doesn't seem to work entirely right though in my testing; I'll need to look into it a bit more. Might be something broken on the gnome-shell side. In any case, here come 3 gnome-software patches to make the situation better. Since we haven't released gnome-software 3.11.92 yet, perhaps the hard code freeze rules don't apply yet ... One remaining pain point that these patches don't fix is the lack of feedback given to the user. After clicking 'Review' on the notification, the recently updated apps list shows up, but it's pretty hard to tell what it is: https://people.gnome.org/~klember/gnome-software-installed-updates.png Previously, gnome-software would set the title of the window to "Recent Software Updates", but after switching to the headerbar, it isn't shown any more.
Created attachment 272423 [details] [review] Remove stale notifications after an offline update has completed
Created attachment 272424 [details] [review] Update the last installed timestamp after successful offline updates This makes sure our internal timestamp is up to date after an external app (e.g. gnome-shell) has triggered offline updates.
Created attachment 272425 [details] [review] Fix showing recently installed updates This fixes the state tracking code so that the updates page doesn't get stuck at "Looking for new updates…" after clicking 'Review' on the notification.
One thing I notice while testing these patches: We don't seem to clear the update information anymore. The gs_offline_updates_clear_status() function is only called after we show an error, or if we trigger it explicitly via an action. I get shown the update information about the last update every single time I launch gnome-software.
Review of attachment 272425 [details] [review]: I don't think this is 100% right. I don't see the 'Looking for new updates' text, but the headerbar now has the 'refresh' button visible, and it shows the number of installed updates in the tab button (6 on blue background).
Attachment 272423 [details] pushed as bfa2ade - Remove stale notifications after an offline update has completed Attachment 272424 [details] pushed as 0e0fe27 - Update the last installed timestamp after successful offline updates Attachment 272425 [details] pushed as 9dfd7ca - Fix showing recently installed updates
(In reply to comment #7) > Review of attachment 272425 [details] [review]: > > I don't think this is 100% right. I don't see the 'Looking for new updates' > text, but the headerbar now has the 'refresh' button visible, and it shows the > number of installed updates in the tab button (6 on blue background). I've pushed a fix for these two things together with your other patches