Gentoo Archives: gentoo-commits

From: Alexandre Restovtsev <tetromino@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gnome:gnome-next commit in: gnome-base/gnome-session/files/, gnome-base/gnome-session/
Date: Mon, 26 Sep 2011 18:44:12
Message-Id: c20becda763333f94700a9495bac0a43a9426b04.tetromino@gentoo
1 commit: c20becda763333f94700a9495bac0a43a9426b04
2 Author: Alexandre Rostovtsev <tetromino <AT> gmail <DOT> com>
3 AuthorDate: Mon Sep 26 17:52:22 2011 +0000
4 Commit: Alexandre Restovtsev <tetromino <AT> gmail <DOT> com>
5 CommitDate: Mon Sep 26 17:52:22 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=c20becda
7
8 gnome-base/gnome-session: 3.1.91 → 3.2.0
9
10 Bump. Patches were applied upstream.
11
12 ---
13 .../gnome-session-3.1.91-dbus-disconnected.patch | 39 -------
14 .../gnome-session-3.1.91-dbus-disconnected2.patch | 118 --------------------
15 ...on-3.1.91.ebuild => gnome-session-3.2.0.ebuild} | 9 +--
16 3 files changed, 1 insertions(+), 165 deletions(-)
17
18 diff --git a/gnome-base/gnome-session/files/gnome-session-3.1.91-dbus-disconnected.patch b/gnome-base/gnome-session/files/gnome-session-3.1.91-dbus-disconnected.patch
19 deleted file mode 100644
20 index 7d59672..0000000
21 --- a/gnome-base/gnome-session/files/gnome-session-3.1.91-dbus-disconnected.patch
22 +++ /dev/null
23 @@ -1,39 +0,0 @@
24 -From 67dd879fbe62bc28d3bbc48b88c3842e2cb827e8 Mon Sep 17 00:00:00 2001
25 -From: Vincent Untz <vuntz@×××××.org>
26 -Date: Fri, 09 Sep 2011 07:51:54 +0000
27 -Subject: gsm: Never mark as handled the Disconnected signal from dbus
28 -
29 -Disconnected is emitted when dbus is quitting. And all the dbus filters
30 -might be interested in this signal, so never mark it as handled when we
31 -look at it.
32 ----
33 -diff --git a/gnome-session/gsm-consolekit.c b/gnome-session/gsm-consolekit.c
34 -index f53993f..66bebd1 100644
35 ---- a/gnome-session/gsm-consolekit.c
36 -+++ b/gnome-session/gsm-consolekit.c
37 -@@ -152,7 +152,8 @@ gsm_consolekit_dbus_filter (DBusConnection *connection,
38 - DBUS_INTERFACE_LOCAL, "Disconnected") &&
39 - strcmp (dbus_message_get_path (message), DBUS_PATH_LOCAL) == 0) {
40 - gsm_consolekit_free_dbus (manager);
41 -- return DBUS_HANDLER_RESULT_HANDLED;
42 -+ /* let other filters get this disconnected signal, so that they
43 -+ * can handle it too */
44 - }
45 -
46 - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
47 -diff --git a/gnome-session/gsm-shell.c b/gnome-session/gsm-shell.c
48 -index 0b26f09..9785160 100644
49 ---- a/gnome-session/gsm-shell.c
50 -+++ b/gnome-session/gsm-shell.c
51 -@@ -228,7 +228,8 @@ gsm_shell_bus_filter (DBusConnection *connection,
52 - DBUS_INTERFACE_LOCAL, "Disconnected") &&
53 - strcmp (dbus_message_get_path (message), DBUS_PATH_LOCAL) == 0) {
54 - gsm_shell_disconnect_from_bus (shell);
55 -- return DBUS_HANDLER_RESULT_HANDLED;
56 -+ /* let other filters get this disconnected signal, so that they
57 -+ * can handle it too */
58 - }
59 -
60 - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
61 ---
62 -cgit v0.9.0.2
63
64 diff --git a/gnome-base/gnome-session/files/gnome-session-3.1.91-dbus-disconnected2.patch b/gnome-base/gnome-session/files/gnome-session-3.1.91-dbus-disconnected2.patch
65 deleted file mode 100644
66 index 7684516..0000000
67 --- a/gnome-base/gnome-session/files/gnome-session-3.1.91-dbus-disconnected2.patch
68 +++ /dev/null
69 @@ -1,118 +0,0 @@
70 -From ae8fa537262d6bec9c7eaa5a963cba98ec4e2136 Mon Sep 17 00:00:00 2001
71 -From: Vincent Untz <vuntz@×××××.org>
72 -Date: Fri, 09 Sep 2011 07:54:14 +0000
73 -Subject: gsm: Disconnect all dbus clients when dbus is disconnected
74 -
75 -When we receive the Disconnected signal from dbus on the session bus,
76 -then we know we won't be able to talk to dbus clients anymore, so mark
77 -them as disconnected. Also, do not restart them even if they're supposed
78 -to be autorestarted, as we won't be able to track them.
79 -
80 -At this point, the session is kind of hosed. We could possibly decide
81 -to simply leave, but we don't do it in case it's a user session and
82 -there's unsaved data.
83 -
84 -This helps a lot in the case of the gdm greeter, see
85 -https://bugzilla.gnome.org/show_bug.cgi?id=658481
86 ----
87 -diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c
88 -index b531197..2d74d40 100644
89 ---- a/gnome-session/gsm-manager.c
90 -+++ b/gnome-session/gsm-manager.c
91 -@@ -151,6 +151,7 @@ struct GsmManagerPrivate
92 -
93 - DBusGProxy *bus_proxy;
94 - DBusGConnection *connection;
95 -+ gboolean dbus_disconnected : 1;
96 -
97 - /* Interface with other parts of the system */
98 - UpClient *up_client;
99 -@@ -1814,6 +1815,11 @@ _disconnect_client (GsmManager *manager,
100 - "phase");
101 - }
102 -
103 -+ if (manager->priv->dbus_disconnected && GSM_IS_DBUS_CLIENT (client)) {
104 -+ g_debug ("GsmManager: dbus disconnected, not restarting application");
105 -+ goto out;
106 -+ }
107 -+
108 - if (app == NULL) {
109 - g_debug ("GsmManager: unable to find application for client - not restarting");
110 - goto out;
111 -@@ -1872,6 +1878,12 @@ _disconnect_dbus_client (const char *id,
112 - return FALSE;
113 - }
114 -
115 -+ /* If no service name, then we simply disconnect all clients */
116 -+ if (!data->service_name) {
117 -+ _disconnect_client (data->manager, client);
118 -+ return TRUE;
119 -+ }
120 -+
121 - name = gsm_dbus_client_get_bus_name (GSM_DBUS_CLIENT (client));
122 - if (IS_STRING_EMPTY (name)) {
123 - return FALSE;
124 -@@ -1885,6 +1897,15 @@ _disconnect_dbus_client (const char *id,
125 - return FALSE;
126 - }
127 -
128 -+/**
129 -+ * remove_clients_for_connection:
130 -+ * @manager: a #GsmManager
131 -+ * @service_name: a service name
132 -+ *
133 -+ * Disconnects clients that own @service_name.
134 -+ *
135 -+ * If @service_name is NULL, then disconnects all clients for the connection.
136 -+ */
137 - static void
138 - remove_clients_for_connection (GsmManager *manager,
139 - const char *service_name)
140 -@@ -1968,10 +1989,32 @@ bus_name_owner_changed (DBusGProxy *bus_proxy,
141 - }
142 - }
143 -
144 -+static DBusHandlerResult
145 -+gsm_manager_bus_filter (DBusConnection *connection,
146 -+ DBusMessage *message,
147 -+ void *user_data)
148 -+{
149 -+ GsmManager *manager;
150 -+
151 -+ manager = GSM_MANAGER (user_data);
152 -+
153 -+ if (dbus_message_is_signal (message,
154 -+ DBUS_INTERFACE_LOCAL, "Disconnected") &&
155 -+ strcmp (dbus_message_get_path (message), DBUS_PATH_LOCAL) == 0) {
156 -+ g_debug ("GsmManager: dbus disconnected; disconnecting dbus clients...");
157 -+ manager->priv->dbus_disconnected = TRUE;
158 -+ remove_clients_for_connection (manager, NULL);
159 -+ /* let other filters get this disconnected signal, so that they
160 -+ * can handle it too */
161 -+ }
162 -+
163 -+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
164 -+}
165 - static gboolean
166 - register_manager (GsmManager *manager)
167 - {
168 - GError *error = NULL;
169 -+ DBusConnection *connection;
170 -
171 - error = NULL;
172 - manager->priv->connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
173 -@@ -1983,6 +2026,12 @@ register_manager (GsmManager *manager)
174 - exit (1);
175 - }
176 -
177 -+ connection = dbus_g_connection_get_connection (manager->priv->connection);
178 -+ dbus_connection_add_filter (connection,
179 -+ gsm_manager_bus_filter,
180 -+ manager, NULL);
181 -+ manager->priv->dbus_disconnected = FALSE;
182 -+
183 - manager->priv->bus_proxy = dbus_g_proxy_new_for_name (manager->priv->connection,
184 - DBUS_SERVICE_DBUS,
185 - DBUS_PATH_DBUS,
186 ---
187 -cgit v0.9.0.2
188
189 diff --git a/gnome-base/gnome-session/gnome-session-3.1.91.ebuild b/gnome-base/gnome-session/gnome-session-3.2.0.ebuild
190 similarity index 92%
191 rename from gnome-base/gnome-session/gnome-session-3.1.91.ebuild
192 rename to gnome-base/gnome-session/gnome-session-3.2.0.ebuild
193 index 2074a82..7523909 100644
194 --- a/gnome-base/gnome-session/gnome-session-3.1.91.ebuild
195 +++ b/gnome-base/gnome-session/gnome-session-3.2.0.ebuild
196 @@ -5,7 +5,7 @@
197 EAPI="4"
198 GCONF_DEBUG="yes"
199
200 -inherit eutils gnome2
201 +inherit gnome2
202 if [[ ${PV} = 9999 ]]; then
203 inherit gnome2-live
204 fi
205 @@ -80,13 +80,6 @@ pkg_setup() {
206 DOCS="AUTHORS ChangeLog NEWS README"
207 }
208
209 -src_prepare() {
210 - gnome2_src_prepare
211 - # Upstream patches to deal with dbus disconnection; will be in next release
212 - epatch "${FILESDIR}/${P}-dbus-disconnected.patch"
213 - epatch "${FILESDIR}/${P}-dbus-disconnected2.patch"
214 -}
215 -
216 src_install() {
217 gnome2_src_install