[gnome-software/wip/mcrha/backport-to-gnome-40] flatpak: Reset app state after an update attempt



commit 06ee958f330a93099ff7592d0631ab111a1af56b
Author: Milan Crha <mcrha redhat com>
Date:   Mon May 24 15:59:38 2021 +0200

    flatpak: Reset app state after an update attempt
    
    Some applications/runtimes can be hidden under parent runtimes, but
    these runtimes can be already updated, thus their state can be left
    in "installing" after the update.

 plugins/flatpak/gs-plugin-flatpak.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/plugins/flatpak/gs-plugin-flatpak.c b/plugins/flatpak/gs-plugin-flatpak.c
index 4ee3bdccd..a6f23e446 100644
--- a/plugins/flatpak/gs-plugin-flatpak.c
+++ b/plugins/flatpak/gs-plugin-flatpak.c
@@ -1175,6 +1175,12 @@ gs_plugin_flatpak_update (GsPlugin *plugin,
                gs_flatpak_error_convert (error);
                remove_schedule_entry (schedule_entry_handle);
                return FALSE;
+       } else {
+               /* Reset the state to have it updated */
+               for (guint i = 0; i < gs_app_list_length (list_tmp); i++) {
+                       GsApp *app = gs_app_list_index (list_tmp, i);
+                       gs_app_set_state (app, GS_APP_STATE_UNKNOWN);
+               }
        }
 
        remove_schedule_entry (schedule_entry_handle);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]