Blame SOURCES/0001-Lower-AsStore-new-API-version-checks-for-Fedora.patch

28717e
From f91c54a70860ed12270bbafa121acae36f29badb Mon Sep 17 00:00:00 2001
28717e
From: Kalev Lember <klember@redhat.com>
28717e
Date: Tue, 18 Dec 2018 02:44:31 +0100
28717e
Subject: [PATCH] Lower AsStore new API version checks for Fedora
28717e
28717e
We have new the AsStore thread safety patches along with new thread safe
28717e
API backported to libappstream-glib-0.7.14-3.fc29.
28717e
---
28717e
 plugins/core/gs-appstream.c        | 12 ++++++------
28717e
 plugins/core/gs-plugin-appstream.c | 12 ++++++------
28717e
 plugins/flatpak/gs-flatpak.c       |  2 +-
28717e
 3 files changed, 13 insertions(+), 13 deletions(-)
28717e
28717e
diff --git a/plugins/core/gs-appstream.c b/plugins/core/gs-appstream.c
28717e
index b7bccd19a..7b606fe0d 100644
28717e
--- a/plugins/core/gs-appstream.c
28717e
+++ b/plugins/core/gs-appstream.c
28717e
@@ -860,7 +860,7 @@ gs_appstream_store_search (GsPlugin *plugin,
28717e
 	gboolean ret = TRUE;
28717e
 	g_autoptr(GPtrArray) array = NULL;
28717e
 
28717e
-#if AS_CHECK_VERSION(0,7,15)
28717e
+#if AS_CHECK_VERSION(0,7,14)
28717e
 	array = as_store_dup_apps (store);
28717e
 #else
28717e
 	array = g_ptr_array_ref (as_store_get_apps (store));
28717e
@@ -937,7 +937,7 @@ gs_appstream_store_add_category_apps (GsPlugin *plugin,
28717e
 	g_autoptr(GPtrArray) array = NULL;
28717e
 
28717e
 	/* just look at each app in turn */
28717e
-#if AS_CHECK_VERSION(0,7,15)
28717e
+#if AS_CHECK_VERSION(0,7,14)
28717e
 	array = as_store_dup_apps (store);
28717e
 #else
28717e
 	array = g_ptr_array_ref (as_store_get_apps (store));
28717e
@@ -985,7 +985,7 @@ gs_appstream_store_add_categories (GsPlugin *plugin,
28717e
 	g_autoptr(GPtrArray) array = NULL;
28717e
 
28717e
 	/* find out how many packages are in each category */
28717e
-#if AS_CHECK_VERSION(0,7,15)
28717e
+#if AS_CHECK_VERSION(0,7,14)
28717e
 	array = as_store_dup_apps (store);
28717e
 #else
28717e
 	array = g_ptr_array_ref (as_store_get_apps (store));
28717e
@@ -1013,7 +1013,7 @@ gs_appstream_add_popular (GsPlugin *plugin,
28717e
 {
28717e
 	g_autoptr(GPtrArray) array = NULL;
28717e
 
28717e
-#if AS_CHECK_VERSION(0,7,15)
28717e
+#if AS_CHECK_VERSION(0,7,14)
28717e
 	array = as_store_dup_apps (store);
28717e
 #else
28717e
 	array = g_ptr_array_ref (as_store_get_apps (store));
28717e
@@ -1059,7 +1059,7 @@ gs_appstream_add_recent (GsPlugin *plugin,
28717e
 {
28717e
 	g_autoptr(GPtrArray) array = NULL;
28717e
 
28717e
-#if AS_CHECK_VERSION(0,7,15)
28717e
+#if AS_CHECK_VERSION(0,7,14)
28717e
 	array = as_store_dup_apps (store);
28717e
 #else
28717e
 	array = g_ptr_array_ref (as_store_get_apps (store));
28717e
@@ -1088,7 +1088,7 @@ gs_appstream_add_featured (GsPlugin *plugin,
28717e
 {
28717e
 	g_autoptr(GPtrArray) array = NULL;
28717e
 
28717e
-#if AS_CHECK_VERSION(0,7,15)
28717e
+#if AS_CHECK_VERSION(0,7,14)
28717e
 	array = as_store_dup_apps (store);
28717e
 #else
28717e
 	array = g_ptr_array_ref (as_store_get_apps (store));
28717e
diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c
28717e
index 77d004162..ce0ca9bda 100644
28717e
--- a/plugins/core/gs-plugin-appstream.c
28717e
+++ b/plugins/core/gs-plugin-appstream.c
28717e
@@ -56,7 +56,7 @@ gs_plugin_appstream_create_app_hash (AsStore *store)
28717e
 
28717e
 	hash = g_hash_table_new_full (g_str_hash, g_str_equal,
28717e
 				      g_free, (GDestroyNotify) g_object_unref);
28717e
-#if AS_CHECK_VERSION(0,7,15)
28717e
+#if AS_CHECK_VERSION(0,7,14)
28717e
 	apps = as_store_dup_apps (store);
28717e
 #else
28717e
 	apps = g_ptr_array_ref (as_store_get_apps (store));
28717e
@@ -290,7 +290,7 @@ gs_plugin_setup (GsPlugin *plugin, GCancellable *cancellable, GError **error)
28717e
 			return FALSE;
28717e
 		}
28717e
 	}
28717e
-#if AS_CHECK_VERSION(0,7,15)
28717e
+#if AS_CHECK_VERSION(0,7,14)
28717e
 	items = as_store_dup_apps (priv->store);
28717e
 #else
28717e
 	items = g_ptr_array_ref (as_store_get_apps (priv->store));
28717e
@@ -391,7 +391,7 @@ gs_plugin_refine_from_id (GsPlugin *plugin,
28717e
 		g_autoptr(GPtrArray) apps_merge = NULL;
28717e
 
28717e
 		g_debug ("no app with ID %s found in system appstream", unique_id);
28717e
-#if AS_CHECK_VERSION(0,7,15)
28717e
+#if AS_CHECK_VERSION(0,7,14)
28717e
 		apps = as_store_dup_apps (priv->store);
28717e
 #else
28717e
 		apps = g_ptr_array_ref (as_store_get_apps (priv->store));
28717e
@@ -405,7 +405,7 @@ gs_plugin_refine_from_id (GsPlugin *plugin,
28717e
 		}
28717e
 
28717e
 		/* fall back to trying to get a merge app */
28717e
-#if AS_CHECK_VERSION(0,7,15)
28717e
+#if AS_CHECK_VERSION(0,7,14)
28717e
 		apps_merge = as_store_dup_apps_by_id_merge (priv->store, gs_app_get_id (app));
28717e
 		for (guint i = 0; i < apps_merge->len; i++) {
28717e
 			item = g_ptr_array_index (apps_merge, i);
28717e
@@ -472,7 +472,7 @@ gs_plugin_add_distro_upgrades (GsPlugin *plugin,
28717e
 	g_autoptr(GPtrArray) array = NULL;
28717e
 
28717e
 	/* find any upgrades */
28717e
-#if AS_CHECK_VERSION(0,7,15)
28717e
+#if AS_CHECK_VERSION(0,7,14)
28717e
 	array = as_store_dup_apps (priv->store);
28717e
 #else
28717e
 	array = g_ptr_array_ref (as_store_get_apps (priv->store));
28717e
@@ -620,7 +620,7 @@ gs_plugin_add_installed (GsPlugin *plugin,
28717e
 	g_autoptr(GPtrArray) array = NULL;
28717e
 
28717e
 	/* search categories for the search term */
28717e
-#if AS_CHECK_VERSION(0,7,15)
28717e
+#if AS_CHECK_VERSION(0,7,14)
28717e
 	array = as_store_dup_apps (priv->store);
28717e
 #else
28717e
 	array = g_ptr_array_ref (as_store_get_apps (priv->store));
28717e
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
28717e
index b835d843c..921fd12e9 100644
28717e
--- a/plugins/flatpak/gs-flatpak.c
28717e
+++ b/plugins/flatpak/gs-flatpak.c
28717e
@@ -328,7 +328,7 @@ gs_flatpak_add_apps_from_xremote (GsFlatpak *self,
28717e
 	}
28717e
 
28717e
 	/* override the *AppStream* origin */
28717e
-#if AS_CHECK_VERSION(0,7,15)
28717e
+#if AS_CHECK_VERSION(0,7,14)
28717e
 	apps = as_store_dup_apps (store);
28717e
 #else
28717e
 	apps = g_ptr_array_ref (as_store_get_apps (store));
28717e
-- 
28717e
2.19.1
28717e