[gnome-software/gnome-3-22] trivial: Only add filtered applications to the remote store
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/gnome-3-22] trivial: Only add filtered applications to the remote store
- Date: Mon, 7 Nov 2016 16:40:46 +0000 (UTC)
commit c7b159225a0c0ef85cf308d270ecf80a8450cbf8
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.
(cherry picked from commit 1db63198ba7f9e6bc82f55a11eb2b33bfab7a8ea)
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 b522160..b2cfbec 100644
--- a/src/plugins/gs-flatpak.c
+++ b/src/plugins/gs-flatpak.c
@@ -162,6 +162,7 @@ gs_flatpak_add_apps_from_xremote (GsFlatpak *self,
g_autoptr(AsStore) store = NULL;
g_autoptr(GFile) appstream_dir = NULL;
g_autoptr(GFile) file = NULL;
+ g_autoptr(GPtrArray) app_filtered = NULL;
/* get the AppStream data location */
appstream_dir = flatpak_remote_get_appstream_dir (xremote, NULL);
@@ -212,6 +213,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);
@@ -238,10 +240,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]