Merge lp://qastaging/~indicator-applet-developers/libindicator/ubuntu into lp://qastaging/~ubuntu-desktop/libindicator/ubuntu

Proposed by Ted Gould
Status: Merged
Merged at revision: not available
Proposed branch: lp://qastaging/~indicator-applet-developers/libindicator/ubuntu
Merge into: lp://qastaging/~ubuntu-desktop/libindicator/ubuntu
Diff against target: 168 lines (+54/-7) (has conflicts)
7 files modified
configure.ac (+2/-2)
debian/changelog (+13/-0)
libindicator/indicator-service-manager.c (+11/-1)
libindicator/indicator-service.c (+14/-2)
tests/Makefile.am (+5/-1)
tests/run-xvfb.sh (+8/-0)
tests/service-shutdown-timeout.c (+1/-1)
Text conflict in debian/changelog
To merge this branch: bzr merge lp://qastaging/~indicator-applet-developers/libindicator/ubuntu
Reviewer Review Type Date Requested Status
Sebastien Bacher Pending
Review via email: mp+18665@code.qastaging.launchpad.net
To post a comment you must log in.
Revision history for this message
Ted Gould (ted) wrote :

0.3.2

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'configure.ac'
2--- configure.ac 2010-01-21 19:04:15 +0000
3+++ configure.ac 2010-02-05 01:45:20 +0000
4@@ -1,10 +1,10 @@
5
6-AC_INIT(libindicator, 0.3.1, ted@canonical.com)
7+AC_INIT(libindicator, 0.3.2, ted@canonical.com)
8
9 AC_PREREQ(2.53)
10
11 AM_CONFIG_HEADER(config.h)
12-AM_INIT_AUTOMAKE(libindicator, 0.3.1)
13+AM_INIT_AUTOMAKE(libindicator, 0.3.2)
14
15 AM_MAINTAINER_MODE
16 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES])
17
18=== modified file 'debian/changelog'
19--- debian/changelog 2010-01-21 20:53:46 +0000
20+++ debian/changelog 2010-02-05 01:45:20 +0000
21@@ -1,4 +1,17 @@
22+<<<<<<< TREE
23 libindicator (0.3.1-0ubuntu1) lucid; urgency=low
24+=======
25+libindicator (0.3.2-0ubuntu1~ppa1) lucid; urgency=low
26+
27+ * Upstream release 0.3.2
28+ * Various fixes to timeout handling in services and the
29+ service manager.
30+ * Fix test suite when run headless
31+
32+ -- Ted Gould <ted@ubuntu.com> Thu, 04 Feb 2010 17:40:06 -0800
33+
34+libindicator (0.3.1-0ubuntu1~ppa1) karmic; urgency=low
35+>>>>>>> MERGE-SOURCE
36
37 * Upstream release 0.3.1
38 * Adding in entry ordering.
39
40=== modified file 'libindicator/indicator-service-manager.c'
41--- libindicator/indicator-service-manager.c 2010-01-21 16:30:52 +0000
42+++ libindicator/indicator-service-manager.c 2010-02-05 01:45:20 +0000
43@@ -397,6 +397,15 @@
44 INDICATOR_SERVICE_OBJECT,
45 INDICATOR_SERVICE_INTERFACE,
46 &error);
47+
48+ if (error != NULL || priv->service_proxy == NULL) {
49+ g_warning("Unable to create service proxy on '%s': %s", priv->name, error == NULL ? "(null)" : error->message);
50+ priv->service_proxy = NULL; /* Should be already, but we want to be *really* sure. */
51+ g_error_free(error);
52+ start_service_again(INDICATOR_SERVICE_MANAGER(user_data));
53+ return;
54+ }
55+
56 g_object_add_weak_pointer(G_OBJECT(priv->service_proxy), (gpointer *)&(priv->service_proxy));
57 g_signal_connect(G_OBJECT(priv->service_proxy), "destroy", G_CALLBACK(service_proxy_destroyed), user_data);
58
59@@ -432,7 +441,7 @@
60 INDICATOR_SERVICE_INTERFACE,
61 &error);
62
63- if (error != NULL) {
64+ if (error != NULL || priv->service_proxy == NULL) {
65 /* We don't care about the error, just start the service anyway. */
66 g_error_free(error);
67 org_freedesktop_DBus_start_service_by_name_async (priv->dbus_proxy,
68@@ -476,6 +485,7 @@
69 {
70 IndicatorServiceManagerPrivate * priv = INDICATOR_SERVICE_MANAGER_GET_PRIVATE(data);
71 priv->restart_count++;
72+ g_debug("Restarting service '%s' count %d", priv->name, priv->restart_count);
73 start_service(INDICATOR_SERVICE_MANAGER(data));
74 priv->restart_source = 0;
75 return FALSE;
76
77=== modified file 'libindicator/indicator-service.c'
78--- libindicator/indicator-service.c 2009-12-04 20:30:44 +0000
79+++ libindicator/indicator-service.c 2010-02-05 01:45:20 +0000
80@@ -316,7 +316,12 @@
81 static gboolean
82 timeout_no_watchers (gpointer data)
83 {
84- g_signal_emit(G_OBJECT(data), signals[SHUTDOWN], 0, TRUE);
85+ g_warning("No watchers, service timing out.");
86+ if (g_getenv("INDICATOR_ALLOW_NO_WATCHERS") == NULL) {
87+ g_signal_emit(G_OBJECT(data), signals[SHUTDOWN], 0, TRUE);
88+ } else {
89+ g_warning("\tblocked by environment variable.");
90+ }
91 return FALSE;
92 }
93
94@@ -329,16 +334,23 @@
95 IndicatorService * service = INDICATOR_SERVICE(data);
96 g_return_if_fail(service != NULL);
97
98+ if (error != NULL) {
99+ g_warning("Unable to send message to request name: %s", error->message);
100+ g_signal_emit(G_OBJECT(data), signals[SHUTDOWN], 0, TRUE);
101+ return;
102+ }
103+
104 if (status != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER && status != DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER) {
105 /* The already owner seems like it shouldn't ever
106 happen, but I have a hard time throwing an error
107 on it as we did achieve our goals. */
108+ g_warning("Name request failed. Status returned: %d", status);
109 g_signal_emit(G_OBJECT(data), signals[SHUTDOWN], 0, TRUE);
110 return;
111 }
112
113 IndicatorServicePrivate * priv = INDICATOR_SERVICE_GET_PRIVATE(service);
114- priv->timeout = g_timeout_add(500, timeout_no_watchers, service);
115+ priv->timeout = g_timeout_add_seconds(1, timeout_no_watchers, service);
116
117 return;
118 }
119
120=== modified file 'tests/Makefile.am'
121--- tests/Makefile.am 2009-12-02 21:58:52 +0000
122+++ tests/Makefile.am 2010-02-05 01:45:20 +0000
123@@ -10,6 +10,9 @@
124 libdummy-indicator-simple.la
125
126 DBUS_RUNNER=dbus-test-runner --dbus-config /usr/share/dbus-test-runner/session.conf
127+XVFB_RUN=". $(srcdir)/run-xvfb.sh"
128+
129+EXTRA_DIST = run-xvfb.sh
130
131 #############################
132 # Test Loader
133@@ -297,7 +300,8 @@
134 HTML_REPORT = loader-check-results.html
135
136 loader-tester: test-loader libdummy-indicator-null.la libdummy-indicator-simple.la Makefile
137- @echo "#!/bin/sh" > loader-tester
138+ @echo "#!/bin/bash" > loader-tester
139+ @echo $(XVFB_RUN) >> $@
140 @echo gtester -k --verbose -o=$(XML_REPORT) ./test-loader >> loader-tester
141 @chmod +x loader-tester
142
143
144=== added file 'tests/run-xvfb.sh'
145--- tests/run-xvfb.sh 1970-01-01 00:00:00 +0000
146+++ tests/run-xvfb.sh 2010-02-05 01:45:20 +0000
147@@ -0,0 +1,8 @@
148+if [ "$DISPLAY" == "" ]; then
149+Xvfb -ac -noreset -screen 0 800x600x16 -help 2>/dev/null 1>&2
150+XID=`for id in 101 102 103 104 105 106 107 197 199 211 223 227 293 307 308 309 310 311 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 4703 4721 4723 4729 4733 4751 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 ; do test -e /tmp/.X$id-lock || { echo $id; exit 0; }; done; exit 1`
151+{ Xvfb -ac -noreset -screen 0 800x600x16 :$XID -screen 0 800x600x16 -nolisten tcp -auth /dev/null >/dev/null 2>&1 & trap "kill -15 $! " 0 HUP INT QUIT TRAP USR1 PIPE TERM ; } || { echo "Gtk+Tests:ERROR: Failed to start Xvfb environment for X11 target tests."; exit 1; }
152+DISPLAY=:$XID
153+export DISPLAY
154+echo Setting display: $DISPLAY
155+fi
156
157=== modified file 'tests/service-shutdown-timeout.c'
158--- tests/service-shutdown-timeout.c 2009-10-29 22:22:29 +0000
159+++ tests/service-shutdown-timeout.c 2010-02-05 01:45:20 +0000
160@@ -31,7 +31,7 @@
161 IndicatorService * is = indicator_service_new("my.test.name");
162 g_signal_connect(G_OBJECT(is), INDICATOR_SERVICE_SIGNAL_SHUTDOWN, shutdown, NULL);
163
164- g_timeout_add_seconds(1, timeout, NULL);
165+ g_timeout_add_seconds(2, timeout, NULL);
166
167 mainloop = g_main_loop_new(NULL, FALSE);
168 g_main_loop_run(mainloop);

Subscribers

People subscribed via source and target branches

to all changes: