Skip to content

flatpak: Use --no-pull flag if update bits are downloaded already

Umang Jain requested to merge uajain/set-no-pull-autoupdate into master

flatpak: Use --no-pull flag if update bits are downloaded already

Autoupdates code path is essentially a GS_PLUGIN_ACTION_DOWNLOAD followed by a GS_PLUGIN_ACTION_UPDATE action. The download action sets the --no-deploy flag on the transaction so that all the update gets downloaded to local cache but does not get deployed (yet).

Hence, the follow-up upate action should just primarily execute the deployment phase for the downloads fetched via GS_PLUGIN_ACTION_DOWNLOAD. Flatpak-cli equivalent is : flatpak update --no-pull

It was discovered that this wasn't the case in gnome-software. Without the --no-pull flag in autoupdates case, GS_PLUGIN_ACTION_UPDATE will try to fetch/query the outstanding updates again. Hence, mark the transaction with --no-pull if we already know that the update bits are already downloaded and available locally.

The bug was noticed while investigating a larger problem in #819 (closed)

Edited by Umang Jain

Merge request reports