From 1928f4f1fa133f684de9680f5a9e2c0ac4ec6c1d Mon Sep 17 00:00:00 2001 From: David King Date: Tue, 29 Nov 2016 16:15:57 +0000 Subject: [PATCH] Fix a GNOME Software crash Additionally, silense output from flatpak in post phase. --- flatpak-0.6.14-fix-gnome-software-crash.patch | 30 +++++++++++++++++++ flatpak.spec | 11 +++++-- 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 flatpak-0.6.14-fix-gnome-software-crash.patch diff --git a/flatpak-0.6.14-fix-gnome-software-crash.patch b/flatpak-0.6.14-fix-gnome-software-crash.patch new file mode 100644 index 0000000..83b4f55 --- /dev/null +++ b/flatpak-0.6.14-fix-gnome-software-crash.patch @@ -0,0 +1,30 @@ +From 31ca19eb99dbd588a1995898ab1baf6cef2180d6 Mon Sep 17 00:00:00 2001 +From: Alexander Larsson +Date: Tue, 29 Nov 2016 16:59:48 +0100 +Subject: [PATCH] pull: Exit early on error without aborting transaction + +At this point we have not set up repo yet, so aborting would crash. +--- + common/flatpak-dir.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c +index 8213440..1094cf4 100644 +--- a/common/flatpak-dir.c ++++ b/common/flatpak-dir.c +@@ -1563,13 +1563,13 @@ flatpak_dir_pull (FlatpakDir *self, + g_autoptr(GPtrArray) subdirs_arg = NULL; + + if (!flatpak_dir_ensure_repo (self, cancellable, error)) +- goto out; ++ return FALSE; + + if (!ostree_repo_remote_get_url (self->repo, + repository, + &url, + error)) +- goto out; ++ return FALSE; + + if (*url == 0) + return TRUE; /* Empty url, silently disables updates */ diff --git a/flatpak.spec b/flatpak.spec index a9b1cfb..30c9a1d 100644 --- a/flatpak.spec +++ b/flatpak.spec @@ -4,13 +4,15 @@ Name: flatpak Version: 0.6.14 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Application deployment framework for desktop apps Group: Development/Tools License: LGPLv2+ URL: http://flatpak.org/ Source0: https://github.com/flatpak/flatpak/releases/download/%{version}/%{name}-%{version}.tar.xz +# Fix a GNOME Software crash. +Patch0: flatpak-0.6.14-fix-gnome-software-crash.patch BuildRequires: pkgconfig(fuse) BuildRequires: pkgconfig(gio-unix-2.0) @@ -101,6 +103,7 @@ This package contains libflatpak. %prep %setup -q +%patch0 -p1 %build @@ -123,7 +126,7 @@ rm -f %{buildroot}%{_libdir}/libflatpak.la %post # Create an (empty) system-wide repo. -flatpak remote-list --system +flatpak remote-list --system &> /dev/null || : %post libs -p /sbin/ldconfig @@ -189,6 +192,10 @@ flatpak remote-list --system %changelog +* Tue Nov 29 2016 David King - 0.6.14-2 +- Add a patch to fix a GNOME Software crash +- Silence repository listing during post + * Tue Nov 29 2016 Kalev Lember - 0.6.14-1 - Update to 0.6.14