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



commit f9d560b7bd5516e4c838bf4d04028a96fb9e4e57
Author: Milan Crha <mcrha redhat com>
Date:   Mon May 17 19:19:13 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 | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/plugins/flatpak/gs-plugin-flatpak.c b/plugins/flatpak/gs-plugin-flatpak.c
index 4ee3bdccd..08eb1f90f 100644
--- a/plugins/flatpak/gs-plugin-flatpak.c
+++ b/plugins/flatpak/gs-plugin-flatpak.c
@@ -1175,6 +1175,11 @@ gs_plugin_flatpak_update (GsPlugin *plugin,
                gs_flatpak_error_convert (error);
                remove_schedule_entry (schedule_entry_handle);
                return FALSE;
+       } else {
+               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]