[gnome-software] plugin loader: Ignore the failure action in case of AS_APP_STATE_UNKNOWN



commit 3e9e1b384b5111fda1d84ef507307f6a015396e9
Author: Kalev Lember <kalevlember gmail com>
Date:   Sat May 30 00:05:53 2015 +0200

    plugin loader: Ignore the failure action in case of AS_APP_STATE_UNKNOWN
    
    This is just a special value for "don't do anything".

 src/gs-plugin-loader.c |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index 663c369..cf1ff72 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -2356,13 +2356,15 @@ gs_plugin_loader_app_action_thread_cb (GTask *task,
                        g_task_return_error (task, error);
                }
        } else {
-               gs_app_set_state (state->app, state->state_failure);
-               addons = gs_app_get_addons (state->app);
-               for (i = 0; i < addons->len; i++) {
-                       GsApp *addon = g_ptr_array_index (addons, i);
-                       if (gs_app_get_to_be_installed (addon)) {
-                               gs_app_set_state (addon, state->state_failure);
-                               gs_app_set_to_be_installed (addon, FALSE);
+               if (state->state_failure != AS_APP_STATE_UNKNOWN) {
+                       gs_app_set_state (state->app, state->state_failure);
+                       addons = gs_app_get_addons (state->app);
+                       for (i = 0; i < addons->len; i++) {
+                               GsApp *addon = g_ptr_array_index (addons, i);
+                               if (gs_app_get_to_be_installed (addon)) {
+                                       gs_app_set_state (addon, state->state_failure);
+                                       gs_app_set_to_be_installed (addon, FALSE);
+                               }
                        }
                }
                g_task_return_error (task, error);


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