[gnome-software/fix-flatpak-related-progress: 2/3] flatpak: Set apps to installed upon missing runtime install
- From: Matthew Leeds <mwleeds src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/fix-flatpak-related-progress: 2/3] flatpak: Set apps to installed upon missing runtime install
- Date: Thu, 9 Jul 2020 02:40:07 +0000 (UTC)
commit 0512ff72b50b08fc79d8e632ab89274c7bb14ae1
Author: Matthew Leeds <matthew leeds endlessm com>
Date: Wed Jul 8 16:27:09 2020 -0700
flatpak: Set apps to installed upon missing runtime install
This commit is a rework of
https://gitlab.gnome.org/GNOME/gnome-software/-/merge_requests/373
The idea is that when an app's runtime is missing, or one of its
should-download related refs is missing, the app will be returned as
updatable by flatpak_installation_list_installed_refs_for_update(), and
will be subsequently added to a transaction by gnome-software. Progress
updates on the app are calculated using the progress of the related
operations. However if the app itself doesn't need an update,
_transaction_operation_done() will never be called for it and so its
state never gets set to AS_APP_STATE_INSTALLED. Fix this by setting the
app to installed when the related thing is, if the app is being skipped
and the related thing is the last operation in the transaction needed
for the app.
plugins/flatpak/gs-flatpak-transaction.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/plugins/flatpak/gs-flatpak-transaction.c b/plugins/flatpak/gs-flatpak-transaction.c
index 3af449a3..5b4c7a59 100644
--- a/plugins/flatpak/gs-flatpak-transaction.c
+++ b/plugins/flatpak/gs-flatpak-transaction.c
@@ -610,6 +610,10 @@ _transaction_operation_done (FlatpakTransaction *transaction,
case FLATPAK_TRANSACTION_OPERATION_INSTALL:
case FLATPAK_TRANSACTION_OPERATION_INSTALL_BUNDLE:
gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+
+#if FLATPAK_CHECK_VERSION(1,7,3)
+ set_skipped_related_apps_to_installed (self, transaction, operation);
+#endif
break;
case FLATPAK_TRANSACTION_OPERATION_UPDATE:
gs_app_set_version (app, gs_app_get_update_version (app));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]