Merge lp:~ted/unity/upstart-panel-service into lp:unity

Proposed by Ted Gould
Status: Merged
Approved by: Christopher Townsend
Approved revision: no longer in the source branch.
Merged at revision: 3364
Proposed branch: lp:~ted/unity/upstart-panel-service
Merge into: lp:unity
Prerequisite: lp:~ted/unity/upstart-job
Diff against target: 76 lines (+17/-17)
5 files modified
UnityCore/DBusIndicators.cpp (+4/-11)
debian/unity-services.install (+1/-1)
services/CMakeLists.txt (+2/-2)
services/com.canonical.Unity.Panel.Service.service.cmake (+0/-3)
services/unity-panel-service.conf.in (+10/-0)
To merge this branch: bzr merge lp:~ted/unity/upstart-panel-service
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Christopher Townsend Approve
Review via email: mp+165739@code.launchpad.net

This proposal supersedes a proposal from 2013-05-17.

Commit message

Manage Unity Panel Service's lifecycle with Upstart.

Description of the change

Change the panel service so that instead of using dbus activation it allows upstart to manage respawning and starting the panel service. This makes it easier to test and restart the panel service as there are tools like "stop unity-panel-service" that can then have full control over the panel service lifetime.

To post a comment you must log in.
Revision history for this message
Ted Gould (ted) wrote :

NOTE: This also depends on https://code.launchpad.net/~ted/unity/upstart-event/+merge/160421, but I expect that to get merged soon and LP won't let me depend on two branches.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Christopher Townsend (townsend) wrote :

This works for Unity trunk. +1

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'UnityCore/DBusIndicators.cpp'
2--- UnityCore/DBusIndicators.cpp 2012-12-04 00:39:47 +0000
3+++ UnityCore/DBusIndicators.cpp 2013-06-05 19:37:37 +0000
4@@ -94,6 +94,10 @@
5 gproxy_.disconnected.connect(sigc::mem_fun(this, &DBusIndicators::Impl::OnDisconnected));
6
7 CheckLocalService();
8+
9+ if (gproxy_.IsConnected()) {
10+ RequestSyncAll();
11+ }
12 }
13
14 void DBusIndicators::Impl::CheckLocalService()
15@@ -136,17 +140,6 @@
16 cached_locations_.clear();
17
18 CheckLocalService();
19- RequestSyncAll();
20-
21- reconnect_timeout_.reset(new glib::TimeoutSeconds(1, [&] {
22- if (!gproxy_.IsConnected())
23- {
24- RequestSyncAll();
25- return true;
26- }
27-
28- return false;
29- }));
30 }
31
32 void DBusIndicators::Impl::OnReSync(GVariant* parameters)
33
34=== modified file 'debian/unity-services.install'
35--- debian/unity-services.install 2011-06-23 08:40:21 +0000
36+++ debian/unity-services.install 2013-06-05 19:37:37 +0000
37@@ -1,3 +1,3 @@
38 usr/lib/unity/*service
39-usr/share/dbus-1
40+usr/share/upstart
41 usr/share/man/*/unity-panel-service.1
42
43=== modified file 'services/CMakeLists.txt'
44--- services/CMakeLists.txt 2012-12-17 11:36:26 +0000
45+++ services/CMakeLists.txt 2013-06-05 19:37:37 +0000
46@@ -51,5 +51,5 @@
47 target_link_libraries(unity-panel-service ${LIBS})
48 install(TARGETS unity-panel-service DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/unity/)
49
50-configure_file(com.canonical.Unity.Panel.Service.service.cmake ${CMAKE_CURRENT_BINARY_DIR}/com.canonical.Unity.Panel.Service.service)
51-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/com.canonical.Unity.Panel.Service.service DESTINATION ${CMAKE_INSTALL_PREFIX}/share/dbus-1/services)
52+configure_file(unity-panel-service.conf.in ${CMAKE_CURRENT_BINARY_DIR}/unity-panel-service.conf)
53+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unity-panel-service.conf DESTINATION ${CMAKE_INSTALL_PREFIX}/share/upstart/sessions)
54
55=== removed file 'services/com.canonical.Unity.Panel.Service.service.cmake'
56--- services/com.canonical.Unity.Panel.Service.service.cmake 2010-11-03 11:44:21 +0000
57+++ services/com.canonical.Unity.Panel.Service.service.cmake 1970-01-01 00:00:00 +0000
58@@ -1,3 +0,0 @@
59-[D-BUS Service]
60-Name=com.canonical.Unity.Panel.Service
61-Exec=${CMAKE_INSTALL_PREFIX}/lib/unity/unity-panel-service
62
63=== added file 'services/unity-panel-service.conf.in'
64--- services/unity-panel-service.conf.in 1970-01-01 00:00:00 +0000
65+++ services/unity-panel-service.conf.in 2013-06-05 19:37:37 +0000
66@@ -0,0 +1,10 @@
67+description "Backing Service for the Unity Panel"
68+author "Ted Gould <ted@ubuntu.com>"
69+
70+start on started unity
71+stop on stopping unity
72+
73+emits indicators-loaded
74+
75+respawn
76+exec ${CMAKE_INSTALL_PREFIX}/lib/unity/unity-panel-service