On 16 January 2018 at 11:14, Joaquim Rocha <jrocha endlessm com> wrote:
> The information I have is that most of Endless' users have some sort of
> connectivity, but it is unstable and metered or very limited. So they're
> very conscious about it's used.
So in this case you'd just default to "automatic downloads and updates" being turned off?
refresh() -> download new metadata
get_updates() -> gets the updates that are not downloaded or deployed
update(app) -> download and deploy the previously downloaded app
Assuming the auto-updates setting is TRUE, in the update monitor rather than calling refresh(PAYLOAD) we'd be calling get_updates(), and feeding that into update(app). The only slight fly in the ointment is that the update vfunc needs to know if the update() is being called interactively (i.e. with a button press) or noninteractively (i.e. from the update_monitor. I don't know if a different vfunc is a good idea here.
We'd still get update progress if we stumbled on the GsApp in the installed, details or update panel, and we'd still be able to cancel the download/deploy action using the GsApp-specific cancellable.
This allows us to delete get_updates_pending, GsPluginRefreshFlags and a whole ton of code in gs-flatpak.c. It also means we can close a few dozen bugs of the kind "gnome-software doesn't show any updates when pkcon does" where the updates are waiting to be downloaded.
For non-live-deployable updates (like PackageKit OS updates) we'd simply download the apps during update() and set them to be deployed on next boot.