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
=== modified file 'UnityCore/DBusIndicators.cpp'
--- UnityCore/DBusIndicators.cpp 2012-12-04 00:39:47 +0000
+++ UnityCore/DBusIndicators.cpp 2013-06-05 19:37:37 +0000
@@ -94,6 +94,10 @@
94 gproxy_.disconnected.connect(sigc::mem_fun(this, &DBusIndicators::Impl::OnDisconnected));94 gproxy_.disconnected.connect(sigc::mem_fun(this, &DBusIndicators::Impl::OnDisconnected));
9595
96 CheckLocalService();96 CheckLocalService();
97
98 if (gproxy_.IsConnected()) {
99 RequestSyncAll();
100 }
97}101}
98102
99void DBusIndicators::Impl::CheckLocalService()103void DBusIndicators::Impl::CheckLocalService()
@@ -136,17 +140,6 @@
136 cached_locations_.clear();140 cached_locations_.clear();
137141
138 CheckLocalService();142 CheckLocalService();
139 RequestSyncAll();
140
141 reconnect_timeout_.reset(new glib::TimeoutSeconds(1, [&] {
142 if (!gproxy_.IsConnected())
143 {
144 RequestSyncAll();
145 return true;
146 }
147
148 return false;
149 }));
150}143}
151144
152void DBusIndicators::Impl::OnReSync(GVariant* parameters)145void DBusIndicators::Impl::OnReSync(GVariant* parameters)
153146
=== modified file 'debian/unity-services.install'
--- debian/unity-services.install 2011-06-23 08:40:21 +0000
+++ debian/unity-services.install 2013-06-05 19:37:37 +0000
@@ -1,3 +1,3 @@
1usr/lib/unity/*service1usr/lib/unity/*service
2usr/share/dbus-12usr/share/upstart
3usr/share/man/*/unity-panel-service.13usr/share/man/*/unity-panel-service.1
44
=== modified file 'services/CMakeLists.txt'
--- services/CMakeLists.txt 2012-12-17 11:36:26 +0000
+++ services/CMakeLists.txt 2013-06-05 19:37:37 +0000
@@ -51,5 +51,5 @@
51target_link_libraries(unity-panel-service ${LIBS})51target_link_libraries(unity-panel-service ${LIBS})
52install(TARGETS unity-panel-service DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/unity/)52install(TARGETS unity-panel-service DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/unity/)
5353
54configure_file(com.canonical.Unity.Panel.Service.service.cmake ${CMAKE_CURRENT_BINARY_DIR}/com.canonical.Unity.Panel.Service.service)54configure_file(unity-panel-service.conf.in ${CMAKE_CURRENT_BINARY_DIR}/unity-panel-service.conf)
55install(FILES ${CMAKE_CURRENT_BINARY_DIR}/com.canonical.Unity.Panel.Service.service DESTINATION ${CMAKE_INSTALL_PREFIX}/share/dbus-1/services)55install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unity-panel-service.conf DESTINATION ${CMAKE_INSTALL_PREFIX}/share/upstart/sessions)
5656
=== removed file 'services/com.canonical.Unity.Panel.Service.service.cmake'
--- services/com.canonical.Unity.Panel.Service.service.cmake 2010-11-03 11:44:21 +0000
+++ services/com.canonical.Unity.Panel.Service.service.cmake 1970-01-01 00:00:00 +0000
@@ -1,3 +0,0 @@
1[D-BUS Service]
2Name=com.canonical.Unity.Panel.Service
3Exec=${CMAKE_INSTALL_PREFIX}/lib/unity/unity-panel-service
40
=== added file 'services/unity-panel-service.conf.in'
--- services/unity-panel-service.conf.in 1970-01-01 00:00:00 +0000
+++ services/unity-panel-service.conf.in 2013-06-05 19:37:37 +0000
@@ -0,0 +1,10 @@
1description "Backing Service for the Unity Panel"
2author "Ted Gould <ted@ubuntu.com>"
3
4start on started unity
5stop on stopping unity
6
7emits indicators-loaded
8
9respawn
10exec ${CMAKE_INSTALL_PREFIX}/lib/unity/unity-panel-service