[gnome-software/wip/hughsie/no-claim-wildcard] Remove the wildcard apps afterthe very first refine call
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/hughsie/no-claim-wildcard] Remove the wildcard apps afterthe very first refine call
- Date: Tue, 16 Jul 2019 09:05:56 +0000 (UTC)
commit fecd52cd19f0591671416a450390484ad475bf23
Author: Richard Hughes <richard hughsie com>
Date: Tue Jul 16 09:53:26 2019 +0100
Remove the wildcard apps afterthe very first refine call
If we have filter flags set then gs_plugin_loader_run_refine_filter() is called
indirectly twice, so all the wildcards get added again as they're only removed
in gs_plugin_loader_run_refine().
Fixes the other half of https://gitlab.gnome.org/GNOME/gnome-software/issues/736
lib/gs-plugin-loader.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index 449d4f4a..9db275f4 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -769,6 +769,12 @@ gs_plugin_loader_call_vfunc (GsPluginLoaderHelper *helper,
return TRUE;
}
+static gboolean
+gs_plugin_loader_app_is_non_wildcard (GsApp *app, gpointer user_data)
+{
+ return !gs_app_has_quirk (app, GS_APP_QUIRK_IS_WILDCARD);
+}
+
static gboolean
gs_plugin_loader_run_refine_filter (GsPluginLoaderHelper *helper,
GsAppList *list,
@@ -809,13 +815,11 @@ gs_plugin_loader_run_refine_filter (GsPluginLoaderHelper *helper,
}
gs_plugin_status_update (plugin, NULL, GS_PLUGIN_STATUS_FINISHED);
}
- return TRUE;
-}
-static gboolean
-gs_plugin_loader_app_is_non_wildcard (GsApp *app, gpointer user_data)
-{
- return !gs_app_has_quirk (app, GS_APP_QUIRK_IS_WILDCARD);
+
+ /* filter any MATCH_ANY_PREFIX apps left in the list */
+ gs_app_list_filter (list, gs_plugin_loader_app_is_non_wildcard, NULL);
+ return TRUE;
}
static gboolean
@@ -970,9 +974,6 @@ gs_plugin_loader_run_refine (GsPluginLoaderHelper *helper,
if (!ret)
goto out;
- /* filter any MATCH_ANY_PREFIX apps left in the list */
- gs_app_list_filter (list, gs_plugin_loader_app_is_non_wildcard, NULL);
-
/* remove any addons that have the same source as the parent app */
for (guint i = 0; i < gs_app_list_length (list); i++) {
g_autoptr(GPtrArray) to_remove = g_ptr_array_new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]