[gnome-software/gnome-3-30] updates section: Be more defensive before triggering reboots



commit 8b81e43986c0eb2f27a605f0fcf11c32186745b5
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 8d9ed2e6..4e857d37 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]