Hello community, here is the log from the commit of package gnome-music for openSUSE:Factory checked in at 2017-06-23 09:16:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gnome-music (Old) and /work/SRC/openSUSE:Factory/.gnome-music.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gnome-music" Fri Jun 23 09:16:02 2017 rev:30 rq:505722 version:3.24.2 Changes: -------- --- /work/SRC/openSUSE:Factory/gnome-music/gnome-music.changes 2017-05-31 12:14:05.280289495 +0200 +++ /work/SRC/openSUSE:Factory/.gnome-music.new/gnome-music.changes 2017-06-23 09:16:04.745813379 +0200 @@ -1,0 +2,6 @@ +Thu Jun 22 11:54:09 UTC 2017 - [email protected] + +- Add gnome-music-group-configs.patch: Fix sefault at launch with + updated python-cairo (bgo#774500, bgo#781326). + +------------------------------------------------------------------- New: ---- gnome-music-group-configs.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gnome-music.spec ++++++ --- /var/tmp/diff_new_pack.t2Z6xX/_old 2017-06-23 09:16:06.377582814 +0200 +++ /var/tmp/diff_new_pack.t2Z6xX/_new 2017-06-23 09:16:06.381582249 +0200 @@ -25,6 +25,8 @@ Url: http://www.gnome.org Source0: http://download.gnome.org/sources/gnome-music/3.24/%{name}-%{version}.tar.xz Source99: %{name}-rpmlintrc +# PATCH-FIX-UPSTREAM gnome-music-group-configs.patch bgo#774500 bgo#781326 [email protected] -- Fix sefault at launch with updated python-cairo +Patch0: gnome-music-group-configs.patch BuildRequires: fdupes BuildRequires: intltool >= 0.26 BuildRequires: itstool @@ -59,6 +61,7 @@ %lang_package %prep %setup -q +%patch0 -p1 %build %configure ++++++ gnome-music-group-configs.patch ++++++ >From e2d375f7ea3fdfaab9012bd1924b44a68dd3021e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Pal=C3=A1cios?= <[email protected]> Date: Tue, 28 Feb 2017 19:20:57 -0300 Subject: gnome-music.in: Group configuration in functions All pre-configurations that must be set before starting gnome-music were grouped in proper functions so it is now easier to read, understand and maintain. It also follows PEP-8 when possible. https://bugzilla.gnome.org/show_bug.cgi?id=774500 --- gnome-music.in | 139 +++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 91 insertions(+), 48 deletions(-) diff --git a/gnome-music.in b/gnome-music.in index e23e357..debe77c 100644 --- a/gnome-music.in +++ b/gnome-music.in @@ -23,88 +23,131 @@ # code, but you are not obligated to do so. If you do not wish to do so, # delete this exception statement from your version. -import sys -import signal -import os -import locale +import argparse import gettext +import locale +import logging +import os +import signal +import sys # Make sure we'll find the pygobject module, even in JHBuild sys.path.insert(1, '@pyexecdir@') # Make sure we'll find the gnomemusic module, even in JHBuild sys.path.insert(1, '@pythondir@') -import argparse -import logging import gi -from gi.repository import Gio -import gnomemusic -localedir = '@localedir@' -srcdir = os.path.abspath(os.path.join(os.path.dirname(gnomemusic.__file__), '..')) -if os.path.exists(os.path.join(srcdir, 'gnome-music.doap')): - print('Running from source tree, using local files') - pkgdatadir = os.path.join(srcdir, 'data') - libgd_libdir = os.path.join(srcdir, 'libgd', '.libs') - libgd_typelibdir = os.path.join(srcdir, 'libgd') - if not os.environ.get('GSETTINGS_SCHEMA_DIR'): - os.environ['GSETTINGS_SCHEMA_DIR'] = pkgdatadir -else: - pkgdatadir = '@pkgdatadir@' - libgd_libdir = '@pkglibdir@' - libgd_typelibdir = '@pkglibdir@/girepository-1.0' - -# We use our own libgd.so, so let gi.repository find it +gi.require_version('Gtk', '3.0') gi.require_version('GIRepository', '2.0') -from gi.repository import GIRepository -GIRepository.Repository.prepend_search_path(libgd_typelibdir) -GIRepository.Repository.prepend_library_path(libgd_libdir) +from gi.repository import GIRepository, Gio, Gtk +import gnomemusic -def install_excepthook(): - """ Make sure we exit when an unhandled exception occurs. """ - gi.require_version('Gtk', '3.0') - from gi.repository import Gtk - old_hook = sys.excepthook + +SOURCE_DIR = os.path.abspath( + os.path.join(os.path.dirname(gnomemusic.__file__), '..')) + +# Defines if we are running from inside project source. This is +# necessary so we can set data and libgd directories correctly. +_LOCAL = os.path.exists(os.path.join(SOURCE_DIR, 'gnome-music.doap')) + +# Directory settings +LOCALE_DIR = '@localedir@' +PKGDATA_DIR = os.path.join(SOURCE_DIR, 'data') if _LOCAL else '@pkgdatadir@' + +# Log settings +LOG_FORMAT = '%(asctime)s %(levelname)s\t%(message)s' +LOG_DATE_FORMAT = '%H:%M:%S' + + +def set_environment_variables(): + """Sets application environment variables.""" + if _LOCAL: + os.environ.setdefault('GSETTINGS_SCHEMA_DIR', PKGDATA_DIR) + + +def set_libgd(): + """Configures application to run our own libgd copy.""" + if _LOCAL: + libgd_libdir = os.path.join(SOURCE_DIR, 'libgd', '.libs') + libgd_typelibdir = os.path.join(SOURCE_DIR, 'libgd') + else: + libgd_libdir = '@pkglibdir@' + libgd_typelibdir = '@pkglibdir@/girepository-1.0' + + GIRepository.Repository.prepend_search_path(libgd_typelibdir) + GIRepository.Repository.prepend_library_path(libgd_libdir) + + +def set_exception_hook(): + """Configures sys.excepthook to enforce Gtk application exiting.""" def new_hook(etype, evalue, etb): old_hook(etype, evalue, etb) while Gtk.main_level(): Gtk.main_quit() sys.exit() + + old_hook = sys.excepthook sys.excepthook = new_hook -if __name__ == "__main__": - install_excepthook() +def set_log_level(): + """Sets application log level according to debug value.""" parser = argparse.ArgumentParser() - parser.add_argument('-d', "--debug", action="store_true", default=False, dest="debug") + parser.add_argument('-d', '--debug', action='store_true', + default=False, dest='debug') args = parser.parse_args() if args.debug: - logging.basicConfig(level=logging.DEBUG, - format='%(asctime)s %(levelname)s\t%(message)s', - datefmt='%H:%M:%S') + logging.basicConfig(level=logging.DEBUG, format=LOG_FORMAT, + datefmt=LOG_DATE_FORMAT) # Gtk hates "-d" switch, so lets drop it if '-d' in sys.argv: - sys.argv.remove("-d") + sys.argv.remove('-d') if '--debug' in sys.argv: - sys.argv.remove("--debug") + sys.argv.remove('--debug') else: - logging.basicConfig(level=logging.WARN, - format='%(asctime)s %(levelname)s\t%(message)s', - datefmt='%H:%M:%S') + logging.basicConfig(level=logging.WARN, format=LOG_FORMAT, + datefmt=LOG_DATE_FORMAT) + - locale.bindtextdomain('gnome-music', localedir) +def set_internationalization(): + """Sets application internationalization.""" + locale.bindtextdomain('gnome-music', LOCALE_DIR) locale.textdomain('gnome-music') - gettext.bindtextdomain('gnome-music', localedir) + gettext.bindtextdomain('gnome-music', LOCALE_DIR) gettext.textdomain('gnome-music') - resource = Gio.resource_load(os.path.join(pkgdatadir, 'gnome-music.gresource')) - Gio.Resource._register(resource) +def set_resources(): + """Sets application ressource file.""" + resource = Gio.resource_load( + os.path.join(PKGDATA_DIR, 'gnome-music.gresource')) + Gio.Resource._register(resource) # nopep8 + + +def run_application(): + """Runs GNOME Music application and returns its exit code.""" from gnomemusic.application import Application app = Application() signal.signal(signal.SIGINT, signal.SIG_DFL) - exit_status = app.run(sys.argv) - sys.exit(exit_status) + return app.run(sys.argv) + + +def main(): + """Sets environment and runs GNOME Music.""" + set_environment_variables() + set_libgd() + set_exception_hook() + set_log_level() + set_internationalization() + set_resources() + return run_application() + + +if __name__ == '__main__': + if _LOCAL: + print('Running from source tree, using local files.') + sys.exit(main()) -- cgit v0.12 >From e2b2a30a9a185e9cc0aca63916409b67d5ad490f Mon Sep 17 00:00:00 2001 From: Felipe Borges <[email protected]> Date: Wed, 26 Apr 2017 11:53:43 +0200 Subject: window: Fix media-player-keys bus name See https://bugzilla.gnome.org/show_bug.cgi?id=781326 https://bugzilla.gnome.org/show_bug.cgi?id=781754 --- gnomemusic/window.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnomemusic/window.py b/gnomemusic/window.py index dd37c51..71b7a99 100644 --- a/gnomemusic/window.py +++ b/gnomemusic/window.py @@ -215,7 +215,7 @@ class Window(Gtk.ApplicationWindow): self.proxy = Gio.DBusProxy.new_sync(Gio.bus_get_sync(Gio.BusType.SESSION, None), Gio.DBusProxyFlags.NONE, None, - 'org.gnome.SettingsDaemon', + 'org.gnome.SettingsDaemon.MediaKeys', '/org/gnome/SettingsDaemon/MediaKeys', 'org.gnome.SettingsDaemon.MediaKeys', None) -- cgit v0.12
