Gentoo Archives: gentoo-commits

From: "Nirbheek Chauhan (nirbheek)" <nirbheek@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in x11-terms/gnome-terminal/files: gnome-terminal-2.26.3.1-partial-fix-dbus-error.patch
Date: Fri, 11 Sep 2009 15:52:39
Message-Id: E1Mm8QP-0007dp-8t@stork.gentoo.org
1 nirbheek 09/09/11 15:52:37
2
3 Added:
4 gnome-terminal-2.26.3.1-partial-fix-dbus-error.patch
5 Log:
6 Partial Fix for bug 268846 -- gnome-terminal errors out when no dbus-daemon is running. Upstream not interested in a complete fix.
7 (Portage version: 2.2_rc40/cvs/Linux i686)
8
9 Revision Changes Path
10 1.1 x11-terms/gnome-terminal/files/gnome-terminal-2.26.3.1-partial-fix-dbus-error.patch
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-terms/gnome-terminal/files/gnome-terminal-2.26.3.1-partial-fix-dbus-error.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-terms/gnome-terminal/files/gnome-terminal-2.26.3.1-partial-fix-dbus-error.patch?rev=1.1&content-type=text/plain
14
15 Index: gnome-terminal-2.26.3.1-partial-fix-dbus-error.patch
16 ===================================================================
17 Partial fix for Gentoo bug 268846, upstream is not interested in a complete fix
18 that allows gnome-terminal to work when gconf-daemon cannot be run.
19
20 --
21 From f41c3d14bdfd533109d7d75bdbb2e2a0ab59b60c Mon Sep 17 00:00:00 2001
22 From: Christian Persch <chpe@×××××.org>
23 Date: Thu, 13 Aug 2009 12:31:11 +0000
24 Subject: Be more lenient in the gconf daemon check
25
26 Using gconf_ping_daemon() wasn't working right, since it returns FALSE
27 not only when the gconf daemon cannot be spawned, but also if the daemon
28 simply isn't running yet, but could be started without problems. Use
29 gconf_spawn_daemon() instead. Should fix problem reported in bug 564649
30 comment 5.
31 ---
32 diff --git a/src/terminal.c b/src/terminal.c
33 index 41285e5..fc0cb2b 100644
34 --- a/src/terminal.c
35 +++ b/src/terminal.c
36 @@ -236,8 +236,8 @@ get_factory_name_for_display (const char *display_name)
37 }
38
39 /* Evil hack alert: this is exported from libgconf-2 but not in a public header */
40 -extern gboolean gconf_ping_daemon (void);
41 -
42 +extern gboolean gconf_spawn_daemon(GError** err);
43 +
44 int
45 main (int argc, char **argv)
46 {
47 @@ -329,7 +329,7 @@ main (int argc, char **argv)
48 {
49 g_printerr ("Failed to get the session bus: %s\nFalling back to non-factory mode.\n",
50 error->message);
51 - g_error_free (error);
52 + g_clear_error (&error);
53 goto factory_disabled;
54 }
55
56 @@ -353,7 +353,7 @@ main (int argc, char **argv)
57 &error))
58 {
59 g_printerr ("Failed name request: %s\n", error->message);
60 - g_error_free (error);
61 + g_clear_error (&error);
62 goto factory_disabled;
63 }
64
65 @@ -419,7 +419,7 @@ main (int argc, char **argv)
66 {
67 /* Incompatible factory version, fall back, to new instance */
68 g_printerr (_("Incompatible factory version; creating a new instance.\n"));
69 - g_error_free (error);
70 + g_clear_error (&error);
71
72 goto factory_disabled;
73 }
74 @@ -449,10 +449,13 @@ factory_disabled:
75 /* If the gconf daemon isn't available (e.g. because there's no dbus
76 * session bus running), we'd crash later on. Tell the user about it
77 * now, and exit. See bug #561663.
78 + * Don't use gconf_ping_daemon() here since the server may just not
79 + * be running yet, but able to be started. See comments on bug #564649.
80 */
81 - if (!gconf_ping_daemon ())
82 + if (!gconf_spawn_daemon (&error))
83 {
84 - g_printerr ("Failed to contact the GConf daemon; exiting.\n");
85 + g_printerr ("Failed to summon the GConf demon: %s\n", error->message);
86 + g_error_free (error);
87 exit (1);
88 }
89
90 --
91 cgit v0.8.2