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 671490 - dbus: fix shutdown
dbus: fix shutdown
Status: RESOLVED FIXED
Product: GConf
Classification: Deprecated
Component: gconf
unspecified
Other All
: Normal normal
: ---
Assigned To: GConf Maintainers
GConf Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-03-06 19:43 UTC by Ray Strode [halfline]
Modified: 2013-04-15 17:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
dbus: fix shutdown (1.06 KB, patch)
2012-03-06 19:43 UTC, Ray Strode [halfline]
committed Details | Review

Description Ray Strode [halfline] 2012-03-06 19:43:41 UTC
Somone recently pointed out to me gconftool-2 --shutdown doesn't work.
Comment 1 Ray Strode [halfline] 2012-03-06 19:43:44 UTC
Created attachment 209109 [details] [review]
dbus: fix shutdown

gconftool-2 wasn't properly shutting down gconfd, because
it was trying to do it before connecting to the daemon.

This commit makes sure that we always first try to connect to
the daemon before asking it to shutdown.
Comment 2 Ross Burton 2012-03-06 22:37:10 UTC
Review of attachment 209109 [details] [review]:

Please commit.
Comment 3 Ray Strode [halfline] 2012-03-19 04:31:58 UTC
Attachment 209109 [details] pushed as 3929961 - dbus: fix shutdown
Comment 4 Christophe Fergeau 2013-04-06 10:58:08 UTC
This patch has the side-effect on causing warnings when running gconftool-2 --makefile-install-rule as root (as happens in packages still using GConf):

# gconftool-2 --makefile-install-rule /etc/gconf/schemas/sound-juicer.schemas >/dev/null

(gconftool-2:4139): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

This is caused by this bit of code in gconftool.c:
 
if (makefile_install_mode || makefile_uninstall_mode)
    {

/* [SNIP] */

      /* shut down daemon, this is a race condition, but will usually work. */
      gconf_shutdown_daemon (NULL);
    }
Comment 5 Christophe Fergeau 2013-04-06 11:02:06 UTC
(In reply to comment #4)
> 
> This is caused by this bit of code in gconftool.c:
> 
> if (makefile_install_mode || makefile_uninstall_mode)
>     {
> 
> /* [SNIP] */
> 
>       /* shut down daemon, this is a race condition, but will usually work. */
>       gconf_shutdown_daemon (NULL);
>     }

I realized I could be a bit more verbose ;)
With the changes from this patch, if the daemon is not running this causes a daemon ping to be sent, which does not work after doing a 'su' from a terminal started from a user gnome session (ie su -c "gconftool-2 -p" gives the same message)
Comment 6 Ray Strode [halfline] 2013-04-15 17:35:37 UTC
After talking to Christophe on irc I pushed a fix here:
https://git.gnome.org/browse/gconf/commit/?id=b0895e1998ebc83ab030ec0f17c0685439f5b404