diff --git a/0001-trivial-Fix-compile-when-using-appstream-glib-0.3.2.patch b/0001-trivial-Fix-compile-when-using-appstream-glib-0.3.2.patch new file mode 100644 index 0000000..c876490 --- /dev/null +++ b/0001-trivial-Fix-compile-when-using-appstream-glib-0.3.2.patch @@ -0,0 +1,82 @@ +From 6944d17219db313d4624dc5ff918b5fa0ed71fce Mon Sep 17 00:00:00 2001 +From: Richard Hughes +Date: Tue, 11 Nov 2014 13:24:53 +0000 +Subject: [PATCH] trivial: Fix compile when using appstream-glib <= 0.3.2 + +--- + src/plugins/gs-plugin-appstream.c | 16 ++++++++++++---- + 1 file changed, 12 insertions(+), 4 deletions(-) + +diff --git a/src/plugins/gs-plugin-appstream.c b/src/plugins/gs-plugin-appstream.c +index 4f6f2d4..b4f3714 100644 +--- a/src/plugins/gs-plugin-appstream.c ++++ b/src/plugins/gs-plugin-appstream.c +@@ -125,6 +125,7 @@ gs_plugin_destroy (GsPlugin *plugin) + g_object_unref (plugin->priv->store); + } + ++#if AS_CHECK_VERSION(0,3,2) + /** + * gs_plugin_appstream_get_origins_hash: + * +@@ -172,6 +173,7 @@ gs_plugin_appstream_get_origins_hash (GPtrArray *array) + g_list_free (keys); + return origins; + } ++#endif + + /** + * gs_plugin_startup: +@@ -179,16 +181,18 @@ gs_plugin_appstream_get_origins_hash (GPtrArray *array) + static gboolean + gs_plugin_startup (GsPlugin *plugin, GError **error) + { +- AsApp *app; +- GHashTable *origins = NULL; + GPtrArray *items; + gboolean ret; +- const gchar *origin; + gchar *tmp; +- guint *perc; + #if AS_CHECK_VERSION(0,3,1) + guint i; + #endif ++#if AS_CHECK_VERSION(0,3,2) ++ AsApp *app; ++ GHashTable *origins = NULL; ++ const gchar *origin; ++ guint *perc; ++#endif + + /* clear all existing applications if the store was invalidated */ + as_store_remove_all (plugin->priv->store); +@@ -227,6 +231,7 @@ gs_plugin_startup (GsPlugin *plugin, GError **error) + } + + /* add search terms for apps not in the main source */ ++#if AS_CHECK_VERSION(0,3,2) + origins = gs_plugin_appstream_get_origins_hash (items); + for (i = 0; i < items->len; i++) { + app = g_ptr_array_index (items, i); +@@ -240,6 +245,7 @@ gs_plugin_startup (GsPlugin *plugin, GError **error) + as_app_add_keyword (app, NULL, origin, -1); + } + } ++#endif + + /* look for any application with a HiDPI icon kudo */ + #if AS_CHECK_VERSION(0,3,1) +@@ -252,8 +258,10 @@ gs_plugin_startup (GsPlugin *plugin, GError **error) + } + #endif + out: ++#if AS_CHECK_VERSION(0,3,2) + if (origins != NULL) + g_hash_table_unref (origins); ++#endif + gs_profile_stop (plugin->profile, "appstream::startup"); + return ret; + } +-- +2.1.0 + diff --git a/gnome-software.spec b/gnome-software.spec index 2046c4b..6315bfa 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -7,7 +7,7 @@ Summary: A software center for GNOME Name: gnome-software Version: 3.14.2 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/System URL: https://wiki.gnome.org/Apps/Software @@ -16,6 +16,9 @@ Source0: http://download.gnome.org/sources/gnome-software/3.14/%{name}-%{versi # Downstream patch to the list of unremovable system apps Patch0: gnome-software-system-apps.patch +# upstream patch +Patch1: 0001-trivial-Fix-compile-when-using-appstream-glib-0.3.2.patch + Requires: appstream-data Requires: epiphany-runtime Requires: glib2%{?_isa} >= %{glib2_version} @@ -49,6 +52,7 @@ and update software in the GNOME desktop. %prep %setup -q %patch0 -p1 -b .system-apps +%patch1 -p1 -b .fix-old-appstream-glib %build %configure --disable-static @@ -107,6 +111,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : %{_datadir}/gnome-software/modulesets.d/*.xml %changelog +* Tue Nov 11 2014 Richard Hughes - 3.14.2-2 +- Backport a patch to fix compilation + * Mon Nov 10 2014 Kalev Lember - 3.14.2-1 - Update to 3.14.2