[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/04: gnu: gnome-music: Fix crash when GOA is not available.
From: |
guix-commits |
Subject: |
02/04: gnu: gnome-music: Fix crash when GOA is not available. |
Date: |
Wed, 2 Sep 2020 09:06:54 -0400 (EDT) |
dannym pushed a commit to branch wip-desktop
in repository guix.
commit 769f4ea088a5ea41c5c2ecb4bfc2a6f7104037f0
Author: Raghav Gururajan <raghavgururajan@disroot.org>
AuthorDate: Tue Sep 1 23:20:45 2020 -0400
gnu: gnome-music: Fix crash when GOA is not available.
* gnu/packages/gnome.scm (gnome-music) [patches]: Add
gnome-music-fix-crash.patch
* gnu/packages/patches/gnome-music-fix-crash.patch: New file
* gnu/local.mk (gnome-music-fix-crash.patch): New reference.
Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
---
gnu/local.mk | 1 +
gnu/packages/gnome.scm | 6 ++--
gnu/packages/patches/gnome-music-fix-crash.patch | 36 ++++++++++++++++++++++++
3 files changed, 41 insertions(+), 2 deletions(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 1ba4c61..dea6113 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1057,6 +1057,7 @@ dist_patch_DATA =
\
%D%/packages/patches/glibc-supported-locales.patch \
%D%/packages/patches/gmp-arm-asm-nothumb.patch \
%D%/packages/patches/gmp-faulty-test.patch \
+ %D%/packages/patches/gnome-music-fix-crash.patch \
%D%/packages/patches/gnome-todo-delete-esource-duplicate.patch \
%D%/packages/patches/gnome-tweaks-search-paths.patch \
%D%/packages/patches/gnupg-default-pinentry.patch \
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 00b36bb..fb0d9c3 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -842,12 +842,14 @@ cloud integration is offered through GNOME Online
Accounts.")
(version-major+minor version) "/"
name "-" version ".tar.xz"))
(sha256
- (base32 "0zdpjgwf48bqb66wrl6k33pzcmc2g3m1046ma7z8xaj9idpi37jh"))))
+ (base32 "0zdpjgwf48bqb66wrl6k33pzcmc2g3m1046ma7z8xaj9idpi37jh"))
+ (patches
+ (search-patches "gnome-music-fix-crash.patch"))))
(build-system meson-build-system)
(outputs '("out" "help"))
(arguments
`(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
- #:python? #t ; To wrap binaries
+ #:python? #t ; To wrap binaries
#:tests? #f ; Tests require networking
#:phases
(modify-phases %standard-phases
diff --git a/gnu/packages/patches/gnome-music-fix-crash.patch
b/gnu/packages/patches/gnome-music-fix-crash.patch
new file mode 100644
index 0000000..be154a7
--- /dev/null
+++ b/gnu/packages/patches/gnome-music-fix-crash.patch
@@ -0,0 +1,36 @@
+From 8e12c01e99fcc1bf706097ee64b2719fb2d87202 Mon Sep 17 00:00:00 2001
+From: Simon McVittie <smcv@debian.org>
+Date: Sun, 30 Aug 2020 15:17:33 +0100
+Subject: [PATCH] scrobbler: Don't crash if gnome-online-accounts is
+ unavailable
+
+goa_client_get_manager() can return NULL (in Python,
+GoaClient.get_manager() can return None) if the gnome-online-accounts
+D-Bus service is not available.
+
+Resolves: gnome-music#410
+Bug-Debian: https://bugs.debian.org/969271
+Signed-off-by: Simon McVittie <smcv@debian.org>
+---
+ gnomemusic/scrobbler.py | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/gnomemusic/scrobbler.py b/gnomemusic/scrobbler.py
+index 04888594..d133f2fa 100644
+--- a/gnomemusic/scrobbler.py
++++ b/gnomemusic/scrobbler.py
+@@ -76,6 +76,11 @@ class GoaLastFM(GObject.GObject):
+ return
+
+ manager = self._client.get_manager()
++
++ if manager is None:
++ self._log.info("GNOME Online Accounts is unavailable")
++ return
++
+ try:
+ manager.call_is_supported_provider(
+ "lastfm", None, self._lastfm_is_supported_cb)
+--
+GitLab
+