From f37cf8e7848e69b50133c79128cea777236cb116 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Wed, 14 Mar 2018 11:02:38 +0100 Subject: [PATCH] Fix crash on initial run with no network https://bugzilla.redhat.com/show_bug.cgi?id=1554986 --- ...loader-Don-t-abort-for-refine-errors.patch | 30 +++++++++++++++++++ gnome-software.spec | 6 +++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 0001-plugin-loader-Don-t-abort-for-refine-errors.patch diff --git a/0001-plugin-loader-Don-t-abort-for-refine-errors.patch b/0001-plugin-loader-Don-t-abort-for-refine-errors.patch new file mode 100644 index 0000000..aac41b1 --- /dev/null +++ b/0001-plugin-loader-Don-t-abort-for-refine-errors.patch @@ -0,0 +1,30 @@ +From 5b24280921bee7fd7ad045641fe7afecf39d8130 Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Tue, 13 Mar 2018 22:22:27 +0100 +Subject: [PATCH] plugin loader: Don't abort() for refine errors + +When refining a wildcard app fails, don't abort(), but instead warn and +return NULL. Refining can fail legitimately, e.g. when there's no +network access to refine a system app with pkgdb data. + +https://bugzilla.redhat.com/show_bug.cgi?id=1554986 +--- + lib/gs-plugin-loader.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c +index 55d8dde837a5..6e956b82acad 100644 +--- a/lib/gs-plugin-loader.c ++++ b/lib/gs-plugin-loader.c +@@ -3749,7 +3749,7 @@ gs_plugin_loader_app_create (GsPluginLoader *plugin_loader, const gchar *unique_ + plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_REFINE, NULL); + helper = gs_plugin_loader_helper_new (plugin_loader, plugin_job); + if (!gs_plugin_loader_run_refine (helper, list, NULL, &error)) { +- g_error ("%s", error->message); ++ g_warning ("%s", error->message); + return NULL; + } + +-- +2.16.2 + diff --git a/gnome-software.spec b/gnome-software.spec index e2375d3..73856a2 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -11,7 +11,7 @@ Name: gnome-software Version: 3.28.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -20,6 +20,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 BuildRequires: gettext BuildRequires: libxslt @@ -213,6 +214,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_mandir}/man1/gnome-software-editor.1* %changelog +* Wed Mar 14 2018 Kalev Lember - 3.28.0-3 +- Fix crash on initial run with no network (#1554986) + * Tue Mar 13 2018 Kalev Lember - 3.28.0-2 - Backport an upstream patch to fix shell extensions app ID