gs-updates-page: Slightly improve OS upgrade invalidation
Remove one call to gs_updates_page_invalidate_downloaded_upgrade()
,
which will remove some spurious invalidations of already-downloaded OS
upgrades.
This happens from calls to gs_plugin_status_update()
. There are three
places where that can be called with GS_PLUGIN_STATUS_INSTALLING
or
GS_PLUGIN_STATUS_REMOVING
: PackageKit, flatpak and rpm-ostree.
Installs and removes of flatpaks and rpm-ostrees cannot affect a pending
OS update (unless the rpm-ostree change is the OS update itself, but
that’s handled already), so we only need to add a notification to the
PackageKit code path.
Unfortunately we can’t change the PackageKit plugin to only emit a
signal for the GsApp
for the actual pending OS upgrade, as that
GsApp
is created and owned by the fedora-pkgdb-collections plugin
rather than the PackageKit plugin. So that means PackageKit has to emit
gs_plugin_updates_changed()
more generally. This is at least an
improvement on before though.
In order to fix this completely, we’d have to merge
fedora-pkgdb-collections into the PackageKit plugin. Ideally, by moving
it to PackageKit itself and implementing the GetDistroUpgrades
method
using it. Then gnome-software could (a) have distro upgrade support for
all distros supported by PackageKit; and (b) not carry a separate
fedora-pkgdb-collections plugin. That’s a lot of work, though, so let’s
just nibble this bit off here for now.
Signed-off-by: Philip Withnall pwithnall@endlessos.org