r52360 - in /desktop/unstable/gnome-settings-daemon/debian: changelog patches/media-keys-Fix-mmkeys-D-Bus-API-to-match-API-docs.patch patches/series

smcv at users.alioth.debian.org smcv at users.alioth.debian.org
Mon Apr 24 18:35:58 UTC 2017


Author: smcv
Date: Mon Apr 24 18:35:57 2017
New Revision: 52360

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=52360
Log:
Own the intended D-Bus name for the MediaKeys API

Own the D-Bus name that the API documentation tells users of the
multimedia keys API they should use (org.gnome.SettingsDaemon.MediaKeys),
in addition to the D-Bus name that they actually use in practice
(org.gnome.SettingsDaemon). (Closes: #861111)

Added:
    desktop/unstable/gnome-settings-daemon/debian/patches/media-keys-Fix-mmkeys-D-Bus-API-to-match-API-docs.patch
Modified:
    desktop/unstable/gnome-settings-daemon/debian/changelog
    desktop/unstable/gnome-settings-daemon/debian/patches/series

Modified: desktop/unstable/gnome-settings-daemon/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-settings-daemon/debian/changelog?rev=52360&op=diff
==============================================================================
--- desktop/unstable/gnome-settings-daemon/debian/changelog	[utf-8] (original)
+++ desktop/unstable/gnome-settings-daemon/debian/changelog	[utf-8] Mon Apr 24 18:35:57 2017
@@ -1,3 +1,13 @@
+gnome-settings-daemon (3.22.2-2) UNRELEASED; urgency=medium
+
+  * d/p/media-keys-Fix-mmkeys-D-Bus-API-to-match-API-docs.patch:
+    Own the D-Bus name that the API documentation tells users of the
+    multimedia keys API they should use (org.gnome.SettingsDaemon.MediaKeys),
+    in addition to the D-Bus name that they actually use in practice
+    (org.gnome.SettingsDaemon). (Closes: #861111)
+
+ -- Simon McVittie <smcv at debian.org>  Mon, 24 Apr 2017 19:28:19 +0100
+
 gnome-settings-daemon (3.22.2-1) unstable; urgency=medium
 
   * New upstream release.

Added: desktop/unstable/gnome-settings-daemon/debian/patches/media-keys-Fix-mmkeys-D-Bus-API-to-match-API-docs.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-settings-daemon/debian/patches/media-keys-Fix-mmkeys-D-Bus-API-to-match-API-docs.patch?rev=52360&op=file
==============================================================================
--- desktop/unstable/gnome-settings-daemon/debian/patches/media-keys-Fix-mmkeys-D-Bus-API-to-match-API-docs.patch	(added)
+++ desktop/unstable/gnome-settings-daemon/debian/patches/media-keys-Fix-mmkeys-D-Bus-API-to-match-API-docs.patch	[utf-8] Mon Apr 24 18:35:57 2017
@@ -0,0 +1,62 @@
+From: Bastien Nocera <hadess at hadess.net>
+Date: Fri, 21 Apr 2017 15:30:47 +0200
+Subject: media-keys: Fix mmkeys D-Bus API to match API docs
+
+Bizarrely, since 2011, gnome-settings-daemon was documented as using
+org.gnome.SettingsDaemon.MediaKeys D-Bus name, but everybody ended up
+using the org.gnome.SettingsDaemon owned by the daemon instead, and
+never reported the discrepancy.
+
+This fixes the code to match the 6-year old API as documented by owning
+the org.gnome.SettingsDaemon.MediaKeys.
+
+The portion of this patch adding the org.gnome.SettingsDaemon.MediaKeys
+name owning will need to be backported as far as reasonably possible by
+distributions, and all users of the API changed before GNOME 3.26. This
+would obviously have been easier if the problem was reported when
+detected, committer of this fix included.
+
+Bug: https://bugzilla.gnome.org/show_bug.cgi?id=781326
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=861111
+Origin: upstream, 3.22.3, commit:12c92274bc118836d9c6dcb5262b82536ef2fe58
+---
+ plugins/media-keys/gsd-media-keys-manager.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c
+index 33b6762c..bf79cd77 100644
+--- a/plugins/media-keys/gsd-media-keys-manager.c
++++ b/plugins/media-keys/gsd-media-keys-manager.c
+@@ -219,6 +219,8 @@ struct GsdMediaKeysManagerPrivate
+ 
+         guint            start_idle_id;
+ 
++        /* Multimedia keys */
++        guint            mmkeys_name_id;
+         MprisController *mpris_controller;
+ };
+ 
+@@ -2926,6 +2928,11 @@ gsd_media_keys_manager_stop (GsdMediaKeysManager *manager)
+                 priv->start_idle_id = 0;
+         }
+ 
++        if (priv->mmkeys_name_id > 0) {
++                g_bus_unown_name (priv->mmkeys_name_id);
++                priv->mmkeys_name_id = 0;
++        }
++
+         if (priv->bus_cancellable != NULL) {
+                 g_cancellable_cancel (priv->bus_cancellable);
+                 g_object_unref (priv->bus_cancellable);
+@@ -3227,6 +3234,11 @@ on_bus_gotten (GObject             *source_object,
+                                            NULL,
+                                            NULL);
+ 
++        manager->priv->mmkeys_name_id = g_bus_own_name_on_connection (manager->priv->connection,
++                                                                      "org.gnome.SettingsDaemon.MediaKeys",
++                                                                      G_BUS_NAME_OWNER_FLAGS_NONE,
++                                                                      NULL, NULL, NULL, NULL);
++
+         g_dbus_proxy_new (manager->priv->connection,
+                           G_DBUS_PROXY_FLAGS_NONE,
+                           NULL,

Modified: desktop/unstable/gnome-settings-daemon/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-settings-daemon/debian/patches/series?rev=52360&op=diff
==============================================================================
--- desktop/unstable/gnome-settings-daemon/debian/patches/series	[utf-8] (original)
+++ desktop/unstable/gnome-settings-daemon/debian/patches/series	[utf-8] Mon Apr 24 18:35:57 2017
@@ -1 +1,2 @@
+media-keys-Fix-mmkeys-D-Bus-API-to-match-API-docs.patch
 04_superP.patch




More information about the pkg-gnome-commits mailing list