[gnome-software/gnome-3-24] Fix popular-overrides



commit 072f3b3f47478e5ddcffc41794ec95c3dee8ba0d
Author: Joaquim Rocha <jrocha endlessm com>
Date:   Fri Mar 31 21:41:32 2017 +0200

    Fix popular-overrides
    
    When the popular overrides setting is set, we need to refine the apps in
    order for them to be valid in the end.
    
    This patch also updates the tests and covers the popular apps overrides.

 lib/gs-plugin-loader.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index ee222fe..1f05d70 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -1715,6 +1715,15 @@ gs_plugin_loader_get_popular_thread_cb (GTask *task,
                        gs_app_add_quirk (app, AS_APP_QUIRK_MATCH_ANY_PREFIX);
                        gs_app_list_add (job->list, app);
                }
+
+               /* prepare refine job */
+               job->action = GS_PLUGIN_ACTION_REFINE;
+               job->function_name = "gs_plugin_refine";
+               job->failure_flags = GS_PLUGIN_FAILURE_FLAGS_USE_EVENTS;
+               if (!gs_plugin_loader_run_refine (job, job->list, cancellable, &error)) {
+                       g_task_return_error (task, error);
+                       return;
+               }
        } else {
                /* do things that would block */
                job->function_name = "gs_plugin_add_popular";


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