diff --git a/0001-appstream-Don-t-compare-appstream-origin-to-package-.patch b/0001-appstream-Don-t-compare-appstream-origin-to-package-.patch new file mode 100644 index 0000000..c8d0667 --- /dev/null +++ b/0001-appstream-Don-t-compare-appstream-origin-to-package-.patch @@ -0,0 +1,63 @@ +From 047a077a0ac308fabe002ad3099b8e1f2f24eccd Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Thu, 15 Mar 2018 11:23:52 +0100 +Subject: [PATCH] appstream: Don't compare appstream origin to package origin + +Use new as_utils_unique_id_match() from appstream-glib 0.7.8 to ignore +origin when matching AsApp to GsApp. In Fedora, we have all of system +appstream coming from system-installed appstream-data package that has +origin "fedora", but actual packages come from e.g. "updates-testing" +which doesn't match up. +--- + plugins/core/gs-plugin-appstream.c | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c +index 9ca091112231..3cd95c586eae 100644 +--- a/plugins/core/gs-plugin-appstream.c ++++ b/plugins/core/gs-plugin-appstream.c +@@ -527,11 +527,28 @@ gs_plugin_refine_wildcard (GsPlugin *plugin, + g_autoptr(GsApp) new = NULL; + + /* is compatible */ ++#if AS_CHECK_VERSION(0,7,8) ++ if (!as_utils_unique_id_match (gs_app_get_unique_id (app), ++ as_app_get_unique_id (item), ++ AS_UNIQUE_ID_MATCH_FLAG_SCOPE | ++ AS_UNIQUE_ID_MATCH_FLAG_BUNDLE_KIND | ++ /* don't match origin as AsApp appstream ++ * origin can differ from package origin */ ++ AS_UNIQUE_ID_MATCH_FLAG_KIND | ++ AS_UNIQUE_ID_MATCH_FLAG_ID | ++ AS_UNIQUE_ID_MATCH_FLAG_BRANCH)) { ++ g_debug ("does not match unique ID constraints: %s, %s", ++ gs_app_get_unique_id (app), ++ as_app_get_unique_id (item)); ++ continue; ++ } ++#else + if (!as_utils_unique_id_equal (gs_app_get_unique_id (app), + as_app_get_unique_id (item))) { + g_debug ("does not match unique ID constraints"); + continue; + } ++#endif + + /* does the app have an installation method */ + if (as_app_get_pkgname_default (item) == NULL && +-- +2.16.2 + +diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c +index 3cd95c586eae..8e558824caca 100644 +--- a/plugins/core/gs-plugin-appstream.c ++++ b/plugins/core/gs-plugin-appstream.c +@@ -527,7 +527,7 @@ gs_plugin_refine_wildcard (GsPlugin *plugin, + g_autoptr(GsApp) new = NULL; + + /* is compatible */ +-#if AS_CHECK_VERSION(0,7,8) ++#if AS_CHECK_VERSION(0,7,7) + if (!as_utils_unique_id_match (gs_app_get_unique_id (app), + as_app_get_unique_id (item), + AS_UNIQUE_ID_MATCH_FLAG_SCOPE | diff --git a/gnome-software.spec b/gnome-software.spec index 73856a2..e2c02ec 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -2,7 +2,7 @@ %global gtk3_version 3.22.4 %global json_glib_version 1.2.0 %global packagekit_version 1.1.1 -%global appstream_glib_version 0.7.3 +%global appstream_glib_version 0.7.7-2 %global libsoup_version 2.52.0 %global gsettings_desktop_schemas_version 3.12.0 %global gnome_desktop_version 3.18.0 @@ -11,7 +11,7 @@ Name: gnome-software Version: 3.28.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -21,6 +21,7 @@ Source0: https://download.gnome.org/sources/gnome-software/3.28/%{name}-%{vers # Backported from upstream Patch0: 0001-Revert-Revert-trivial-Use-new-libappstream-glib-to-b.patch Patch1: 0001-plugin-loader-Don-t-abort-for-refine-errors.patch +Patch2: 0001-appstream-Don-t-compare-appstream-origin-to-package-.patch BuildRequires: gettext BuildRequires: libxslt @@ -214,6 +215,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_mandir}/man1/gnome-software-editor.1* %changelog +* Thu Mar 15 2018 Kalev Lember - 3.28.0-4 +- Fix opening results from gnome-shell search provider + * Wed Mar 14 2018 Kalev Lember - 3.28.0-3 - Fix crash on initial run with no network (#1554986)