[gnome-software/wip/kalev/flatpak-fixes: 7/7] updates section: Be more defensive before triggering reboots



commit c85432c779d76f566eb3e303a1cdaa577ccb3af0
Author: Kalev Lember <klember redhat com>
Date:   Wed Oct 3 14:36:41 2018 +0200

    updates section: Be more defensive before triggering reboots
    
    Instead of checking that app state != UPDATABLE_LIVE, check that it is
    UPDATABLE. This ensures that we don't do a reboot in case of an
    unexpected state, such as INSTALLING.
    
    https://gitlab.gnome.org/GNOME/gnome-software/issues/483

 src/gs-updates-section.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/gs-updates-section.c b/src/gs-updates-section.c
index c0e0137f..2d27c317 100644
--- a/src/gs-updates-section.c
+++ b/src/gs-updates-section.c
@@ -335,7 +335,7 @@ _button_update_all_clicked_cb (GtkButton *button, GsUpdatesSection *self)
        /* look at each app in turn */
        for (guint i = 0; i < gs_app_list_length (self->list); i++) {
                GsApp *app = gs_app_list_index (self->list, i);
-               if (gs_app_get_state (app) != AS_APP_STATE_UPDATABLE_LIVE)
+               if (gs_app_get_state (app) == AS_APP_STATE_UPDATABLE)
                        helper->do_reboot = TRUE;
                if (gs_app_has_quirk (app, AS_APP_QUIRK_NEEDS_REBOOT))
                        helper->do_reboot_notification = TRUE;


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