Merge lp:~charlesk/indicator-bluetooth/upstart-job into lp:indicator-bluetooth/14.04

Proposed by Charles Kerr
Status: Merged
Approved by: Ted Gould
Approved revision: 80
Merged at revision: 78
Proposed branch: lp:~charlesk/indicator-bluetooth/upstart-job
Merge into: lp:indicator-bluetooth/14.04
Diff against target: 117 lines (+67/-14)
5 files modified
data/Makefile.am (+41/-11)
data/indicator-bluetooth.conf.in (+11/-0)
data/indicator-bluetooth.desktop.in (+7/-0)
data/indicator-bluetooth.service.in (+0/-3)
data/indicator-bluetooth.upstart.desktop.in (+8/-0)
To merge this branch: bzr merge lp:~charlesk/indicator-bluetooth/upstart-job
Reviewer Review Type Date Requested Status
Iain Lane desktop-files Approve
PS Jenkins bot (community) continuous-integration Approve
Ted Gould (community) Approve
Review via email: mp+198100@code.launchpad.net

Commit message

Switching DBus service to an Upstart Job.

Description of the change

Looks like this indicator was overlooked back when all the others got switched over to upstart.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Iain Lane (laney) wrote :

Instead of NotShowIn, you should ship a desktop file with Hidden=true in /usr/share/upstart/xdg/autostart/ (this directory is prepended to XDG_CONFIG_DIRS under upstart user sessions). This will cause it to not start via XDG autostart exactly when user sessions are in use, which is probably what you really want. Having Unity in there smells a bit.

review: Needs Fixing
Revision history for this message
Ted Gould (ted) wrote :

On Fri, 2013-12-06 at 17:44 +0000, Iain Lane wrote:

> Instead of NotShowIn, you should ship a desktop file with Hidden=true in /usr/share/upstart/xdg/autostart/ (this directory is prepended to XDG_CONFIG_DIRS under upstart user sessions). This will cause it to not start via XDG autostart exactly when user sessions are in use, which is probably what you really want. Having Unity in there smells a bit.

The problem is the opposite. We want it to start in non-Upstart user
sessions and use the Upstart job in Upstart user sessions.

Revision history for this message
Ted Gould (ted) :
review: Approve
Revision history for this message
Iain Lane (laney) wrote :

On Fri, Dec 06, 2013 at 10:15:35PM -0000, Ted Gould wrote:
> On Fri, 2013-12-06 at 17:44 +0000, Iain Lane wrote:
>
> > Instead of NotShowIn, you should ship a desktop file with Hidden=true in /usr/share/upstart/xdg/autostart/ (this directory is prepended to XDG_CONFIG_DIRS under upstart user sessions). This will cause it to not start via XDG autostart exactly when user sessions are in use, which is probably what you really want. Having Unity in there smells a bit.
>
>
> The problem is the opposite. We want it to start in non-Upstart user
> sessions and use the Upstart job in Upstart user sessions.

That's what I said.

--
Iain Lane [ <email address hidden> ]
Debian Developer [ <email address hidden> ]
Ubuntu Developer [ <email address hidden> ]

Revision history for this message
Iain Lane (laney) wrote :

On Fri, Dec 06, 2013 at 10:21:17PM +0000, Iain Lane wrote:
> On Fri, Dec 06, 2013 at 10:15:35PM -0000, Ted Gould wrote:
> > On Fri, 2013-12-06 at 17:44 +0000, Iain Lane wrote:
> >
> > > Instead of NotShowIn, you should ship a desktop file with Hidden=true in /usr/share/upstart/xdg/autostart/ (this directory is prepended to XDG_CONFIG_DIRS under upstart user sessions). This will cause it to not start via XDG autostart exactly when user sessions are in use, which is probably what you really want. Having Unity in there smells a bit.
> >
> >
> > The problem is the opposite. We want it to start in non-Upstart user
> > sessions and use the Upstart job in Upstart user sessions.
>
> That's what I said.

To be clear, you ship both desktop files. See gnome-settings-daemon for
an example.

--
Iain Lane [ <email address hidden> ]
Debian Developer [ <email address hidden> ]
Ubuntu Developer [ <email address hidden> ]

Revision history for this message
Ted Gould (ted) wrote :

On Fri, 2013-12-06 at 22:24 +0000, Iain Lane wrote:

> On Fri, Dec 06, 2013 at 10:21:17PM +0000, Iain Lane wrote:
> > That's what I said.
>
> To be clear, you ship both desktop files. See gnome-settings-daemon for
> an example.

Ah, I see. I was not aware of the override directory in Upstart. Yes,
we should do that for all the indicators. It is better than NoShowIn.

78. By Charles Kerr

add a second .desktop file to be installed in /usr/share/upstart/xdg/autostart with Hidden=true

79. By Charles Kerr

remove NotShowIn=Unity from the main .desktop file

80. By Charles Kerr

sync with trunk

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

The desktop files look right to me, thanks!

(This is only a visual review)

review: Approve (desktop-files)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/Makefile.am'
2--- data/Makefile.am 2013-08-09 22:11:59 +0000
3+++ data/Makefile.am 2013-12-18 12:57:20 +0000
4@@ -1,23 +1,53 @@
5+BUILT_SOURCES =
6+EXTRA_DIST =
7+CLEANFILES =
8
9 # the indicator bus file
10 indicatorsdir = $(datadir)/unity/indicators
11 dist_indicators_DATA = com.canonical.indicator.bluetooth
12
13-# the dbus service file
14-dbus_servicesdir = $(datadir)/dbus-1/services
15-dbus_services_DATA = indicator-bluetooth.service
16-
17-%.service: %.service.in
18- sed -e "s|\@pkglibexecdir\@|$(pkglibexecdir)|" $< > $@
19-
20+# the upstart job file
21+upstart_jobsdir = $(datadir)/upstart/sessions
22+upstart_jobs_DATA = indicator-bluetooth.conf
23+upstart_jobs_in = $(upstart_jobs_DATA:.conf=.conf.in)
24+$(upstart_jobs_DATA): $(upstart_jobs_in)
25+ $(AM_V_GEN) $(SED) -e "s|\@pkglibexecdir\@|$(pkglibexecdir)|" $< > $@
26+BUILT_SOURCES += $(upstart_jobs_DATA)
27+EXTRA_DIST += $(upstart_jobs_in)
28+CLEANFILES += $(upstart_jobs_DATA)
29+
30+# the upstart version of the xdg autostart job file
31+# see https://code.launchpad.net/~charlesk/indicator-bluetooth/upstart-job/+merge/198100
32+upstart_xdg_autostartdir = $(datadir)/upstart/xdg/autostart
33+upstart_xdg_autostart_DATA = indicator-bluetooth.desktop
34+upstart_xdg_autostart_in = indicator-bluetooth.upstart.desktop.in
35+$(upstart_xdg_autostart_DATA): $(upstart_xdg_autostart_in)
36+ $(AM_V_GEN) $(SED) -e "s|\@pkglibexecdir\@|$(pkglibexecdir)|" $< > $@
37+BUILT_SOURCES += $(upstart_xdg_autostart_DATA)
38+EXTRA_DIST += $(upstart_xdg_autostart_in)
39+CLEANFILES += $(upstart_xdg_autostart_DATA)
40+
41+# the xdg autostart job file
42+xdg_autostartdir = /etc/xdg/autostart
43+xdg_autostart_DATA = indicator-bluetooth.desktop
44+xdg_autostart_in = $(xdg_autostart_DATA:.desktop=.desktop.in)
45+$(xdg_autostart_DATA): $(xdg_autostart_in)
46+ $(AM_V_GEN) $(SED) -e "s|\@pkglibexecdir\@|$(pkglibexecdir)|" $< > $@
47+BUILT_SOURCES += $(xdg_autostart_DATA)
48+EXTRA_DIST += $(xdg_autostart_in)
49+CLEANFILES += $(xdg_autostart_DATA)
50+
51+# the gsettings schema
52 gsettings_SCHEMAS = com.canonical.indicator.bluetooth.gschema.xml
53 @INTLTOOL_XML_NOMERGE_RULE@
54 @GSETTINGS_RULES@
55
56-EXTRA_DIST = \
57- indicator-bluetooth.service.in \
58- com.canonical.indicator.bluetooth.gschema.xml.in
59+EXTRA_DIST += \
60+ com.canonical.indicator.bluetooth.gschema.xml.in \
61+ indicator-bluetooth.conf.in \
62+ indicator-bluetooth.desktop.in \
63+ indicator-bluetooth.upstart.desktop.in
64
65-CLEANFILES = \
66+CLEANFILES += \
67 $(dbus_services_DATA) \
68 $(gsettings_SCHEMAS)
69
70=== added file 'data/indicator-bluetooth.conf.in'
71--- data/indicator-bluetooth.conf.in 1970-01-01 00:00:00 +0000
72+++ data/indicator-bluetooth.conf.in 2013-12-18 12:57:20 +0000
73@@ -0,0 +1,11 @@
74+description "Indicator Bluetooth Backend"
75+
76+# Want to move to indicator-services-[start|end], but that's not all
77+# there yet. Use the signals that exist today for now.
78+
79+start on indicators-loaded or indicator-services-start
80+stop on desktop-end or indicator-services-end
81+
82+respawn
83+
84+exec @pkglibexecdir@/indicator-bluetooth-service
85
86=== added file 'data/indicator-bluetooth.desktop.in'
87--- data/indicator-bluetooth.desktop.in 1970-01-01 00:00:00 +0000
88+++ data/indicator-bluetooth.desktop.in 2013-12-18 12:57:20 +0000
89@@ -0,0 +1,7 @@
90+[Desktop Entry]
91+Type=Application
92+Name=Indicator Bluetooth
93+Exec=@pkglibexecdir@/indicator-bluetooth-service
94+NoDisplay=true
95+StartupNotify=false
96+Terminal=false
97
98=== removed file 'data/indicator-bluetooth.service.in'
99--- data/indicator-bluetooth.service.in 2013-01-31 17:42:17 +0000
100+++ data/indicator-bluetooth.service.in 1970-01-01 00:00:00 +0000
101@@ -1,3 +0,0 @@
102-[D-BUS Service]
103-Name=com.canonical.indicator.bluetooth
104-Exec=@pkglibexecdir@/indicator-bluetooth-service
105
106=== added file 'data/indicator-bluetooth.upstart.desktop.in'
107--- data/indicator-bluetooth.upstart.desktop.in 1970-01-01 00:00:00 +0000
108+++ data/indicator-bluetooth.upstart.desktop.in 2013-12-18 12:57:20 +0000
109@@ -0,0 +1,8 @@
110+[Desktop Entry]
111+Type=Application
112+Name=Indicator Bluetooth
113+Exec=@pkglibexecdir@/indicator-bluetooth-service
114+NoDisplay=true
115+StartupNotify=false
116+Terminal=false
117+Hidden=true

Subscribers

People subscribed via source and target branches