[gnome-software] trivial: Allow INSTALLED -> UPDATABLE as a state transition



commit 77c82f094b211fd45f351249c73dd83f76b30306
Author: Richard Hughes <richard hughsie com>
Date:   Fri Oct 21 13:33:29 2016 +0100

    trivial: Allow INSTALLED -> UPDATABLE as a state transition

 src/gs-app.c             |    4 +++-
 src/plugins/gs-flatpak.c |    2 --
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/gs-app.c b/src/gs-app.c
index 37996d2..9edaa18 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -709,7 +709,9 @@ gs_app_set_state_internal (GsApp *app, AsAppState state)
        case AS_APP_STATE_INSTALLED:
                /* installed has to go into an action state */
                if (state == AS_APP_STATE_UNKNOWN ||
-                   state == AS_APP_STATE_REMOVING)
+                   state == AS_APP_STATE_REMOVING ||
+                   state == AS_APP_STATE_UPDATABLE ||
+                   state == AS_APP_STATE_UPDATABLE_LIVE)
                        state_change_ok = TRUE;
                break;
        case AS_APP_STATE_QUEUED_FOR_INSTALL:
diff --git a/src/plugins/gs-flatpak.c b/src/plugins/gs-flatpak.c
index 84b7fc5..21d60ce 100644
--- a/src/plugins/gs-flatpak.c
+++ b/src/plugins/gs-flatpak.c
@@ -956,8 +956,6 @@ gs_flatpak_add_updates (GsFlatpak *self, GsAppList *list,
                        g_warning ("failed to add flatpak: %s", error_local->message);
                        continue;
                }
-               if (gs_app_get_state (app) == AS_APP_STATE_INSTALLED)
-                       gs_app_set_state (app, AS_APP_STATE_UNKNOWN);
                gs_app_set_state (app, AS_APP_STATE_UPDATABLE_LIVE);
                gs_app_list_add (list, app);
        }


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