Fix crash on initial run with no network

https://bugzilla.redhat.com/show_bug.cgi?id=1554986
This commit is contained in:
Kalev Lember 2018-03-14 11:02:38 +01:00
parent baee44cd42
commit f37cf8e784
2 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,30 @@
From 5b24280921bee7fd7ad045641fe7afecf39d8130 Mon Sep 17 00:00:00 2001
From: Kalev Lember <klember@redhat.com>
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

View File

@ -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 <klember@redhat.com> - 3.28.0-3
- Fix crash on initial run with no network (#1554986)
* Tue Mar 13 2018 Kalev Lember <klember@redhat.com> - 3.28.0-2
- Backport an upstream patch to fix shell extensions app ID