[gnome-software/wip/jrocha/fix_popular_overrides: 18/20] Fix popular-overrides



commit 5a102ad9479f17d828a8a0b045976fe5b4654353
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.

 lib/gs-plugin-loader.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index 600e2f7..cb5d856 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -1794,6 +1794,16 @@ 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]