[gnome-software/1252-gnome-software-is-not-able-to-update-org-freedesktop-platform-ffmpeg-full: 13/14] flatpak: Reset app state after an update attempt




commit 9aa9061dd89417dccd0d66a5f99494d2465f134a
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]