[gnome-software] trivial: Only add filtered applications to the remote store
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Only add filtered applications to the remote store
- Date: Fri, 4 Nov 2016 15:13:48 +0000 (UTC)
commit 1db63198ba7f9e6bc82f55a11eb2b33bfab7a8ea
Author: Richard Hughes <richard hughsie com>
Date: Fri Nov 4 15:12:58 2016 +0000
trivial: Only add filtered applications to the remote store
This means if we have multiple apps in different branches we only add the ones
that actually match the default branch.
src/plugins/gs-flatpak.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-flatpak.c b/src/plugins/gs-flatpak.c
index 3f871a4..970af9c 100644
--- a/src/plugins/gs-flatpak.c
+++ b/src/plugins/gs-flatpak.c
@@ -200,6 +200,7 @@ gs_flatpak_add_apps_from_xremote (GsFlatpak *self,
g_autoptr(GFile) appstream_dir = NULL;
g_autoptr(GFile) file = NULL;
g_autoptr(GSettings) settings = NULL;
+ g_autoptr(GPtrArray) app_filtered = NULL;
/* profile */
ptask = as_profile_start (gs_plugin_get_profile (self->plugin),
@@ -260,6 +261,7 @@ gs_flatpak_add_apps_from_xremote (GsFlatpak *self,
/* get all the apps and fix them up */
apps = as_store_get_apps (store);
+ app_filtered = g_ptr_array_new ();
for (i = 0; i < apps->len; i++) {
AsApp *app = g_ptr_array_index (apps, i);
@@ -286,10 +288,11 @@ gs_flatpak_add_apps_from_xremote (GsFlatpak *self,
as_app_set_origin (app, flatpak_remote_get_name (xremote));
as_app_add_keyword (app, NULL, "flatpak");
g_debug ("adding %s", as_app_get_unique_id (app));
+ g_ptr_array_add (app_filtered, app);
}
/* add them to the main store */
- as_store_add_apps (self->store, apps);
+ as_store_add_apps (self->store, app_filtered);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]