After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 646257 - dbus: Avoid losing org.freedesktop.Notifications on replacement
dbus: Avoid losing org.freedesktop.Notifications on replacement
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks: GnomeShell301
 
 
Reported: 2011-03-30 18:35 UTC by Colin Walters
Modified: 2011-04-13 13:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
dbus: Avoid losing org.freedesktop.Notifications on replacement (2.03 KB, patch)
2011-03-30 18:35 UTC, Colin Walters
reviewed Details | Review
dbus: Avoid losing org.freedesktop.Notifications on replacement (2.69 KB, patch)
2011-04-12 17:52 UTC, Colin Walters
committed Details | Review

Description Colin Walters 2011-03-30 18:35:41 UTC
We weren't specifying _ALLOW_REPLACEMENT for anything except
org.gnome.Shell, which created a race - if the exiting process
didn't exit fast enough, the replacing process would fail
to get the name.
Comment 1 Colin Walters 2011-03-30 18:35:44 UTC
Created attachment 184726 [details] [review]
dbus: Avoid losing org.freedesktop.Notifications on replacement
Comment 2 Colin Walters 2011-03-31 21:02:12 UTC
This can wait to 3.0.1 probably.
Comment 3 Matthias Clasen 2011-04-04 11:01:10 UTC
Moving off the blocker list, then
Comment 4 Dan Winship 2011-04-11 18:13:34 UTC
Comment on attachment 184726 [details] [review]
dbus: Avoid losing org.freedesktop.Notifications on replacement

>    * Xephyr */

hm... that's a suspicious bit of patch context. It looks like the comment here was not properly updated when I removed --xephyr. Can you fix that too while you're there?

>   if (!dbus_g_proxy_call (bus, "RequestName", &error,
>                           G_TYPE_STRING, "org.freedesktop.Notifications",
>-                          G_TYPE_UINT, DBUS_NAME_FLAG_REPLACE_EXISTING | DBUS_NAME_FLAG_DO_NOT_QUEUE,
>+                          G_TYPE_UINT, request_name_flags,

If notification-daemon accidentally got activated somehow before gnome-shell, this would prevent the normal gnome-shell session from starting. I think you want "DBUS_NAME_FLAG_REPLACE_EXISTING | request_name_flags" on this one.
Comment 5 Colin Walters 2011-04-12 17:41:10 UTC
(In reply to comment #4)
> (From update of attachment 184726 [details] [review])
> >    * Xephyr */
> 
> hm... that's a suspicious bit of patch context. It looks like the comment here
> was not properly updated when I removed --xephyr. Can you fix that too while
> you're there?

Actually this revealed that we should be always specifying REPLACE_EXISTING for org.gnome.panel too.

> If notification-daemon accidentally got activated somehow before gnome-shell,
> this would prevent the normal gnome-shell session from starting. I think you
> want "DBUS_NAME_FLAG_REPLACE_EXISTING | request_name_flags" on this one.

Good point, fixed.
Comment 6 Colin Walters 2011-04-12 17:52:37 UTC
Created attachment 185817 [details] [review]
dbus: Avoid losing org.freedesktop.Notifications on replacement

Always REPLACE_EXISTING for non-primary names
Comment 7 Colin Walters 2011-04-13 13:44:01 UTC
Attachment 185817 [details] pushed as 42e26a8 - dbus: Avoid losing org.freedesktop.Notifications on replacement