mtp

Merge lp:~phablet-team/mtp/fix-upstart-handling into lp:mtp

Proposed by Ricardo Salveti
Status: Merged
Approved by: Ricardo Salveti
Approved revision: 69
Merge reported by: Mathieu Trudel-Lapierre
Merged at revision: not available
Proposed branch: lp:~phablet-team/mtp/fix-upstart-handling
Merge into: lp:mtp
Diff against target: 85 lines (+12/-30)
5 files modified
debian/changelog (+10/-0)
debian/mtp-server.conf (+2/-3)
debian/mtp-server.install (+0/-1)
debian/mtp-server.mtp-state.upstart (+0/-18)
debian/rules (+0/-8)
To merge this branch: bzr merge lp:~phablet-team/mtp/fix-upstart-handling
Reviewer Review Type Date Requested Status
Ricardo Salveti (community) Approve
Mathieu Trudel-Lapierre Pending
PS Jenkins bot continuous-integration Pending
Review via email: mp+252658@code.launchpad.net

This proposal supersedes a proposal from 2015-03-11.

Commit message

fix the upstart job of mtp-server to make it start again

drop all mtp-state handling, we start/stop the server directly from udev events via the usb-service shipped in lxc-android-config now

Description of the change

fix the upstart job of mtp-server to make it start again

drop all mtp-state handling, we start/stop the server directly from udev events via the usb-service shipped in lxc-android-config now

To post a comment you must log in.
Revision history for this message
Sergio Schvezov (sergiusens) wrote : Posted in a previous version of this proposal

I took a glance at the lxc-android-config and it seems like a neat approach.

And given that there are start and stop stanzas there, do we need upstart jobs at all here?

Also, since I can't review lxc-android-config; there seems to be no locking and wait_for_greeter blocks for mtp at least, so you might have a situation of multiple calls causing races. Should be lock/mutex the binary call?

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Ricardo Salveti (rsalveti) wrote : Posted in a previous version of this proposal

LGTM, will test and then top approve.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote : Posted in a previous version of this proposal

Looks good to me too.

review: Approve
Revision history for this message
Ricardo Salveti (rsalveti) :
review: Approve
69. By Ricardo Salveti

Adding again removed blank line from previous merge

70. By Oliver Grawert

drop th DISCONNECTED check from the upstart job

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2015-03-11 19:36:38 +0000
3+++ debian/changelog 2015-03-19 13:20:48 +0000
4@@ -1,3 +1,13 @@
5+mtp (0.0.4+15.04.20150219-0ubuntu3) UNRELEASED; urgency=medium
6+
7+ * fix the upstart job of mtp-server to make it start again
8+ * drop all mtp-state handling, we start/stop the server directly from udev
9+ events via the usb-service shipped in lxc-android-config now
10+ * drop "DISCONNECTED" check, we are on manual anyway with the upstart job,
11+ only udev rules or explicit session jobs will trigger it.
12+
13+ -- Oliver Grawert <ogra@ubuntu.com> Wed, 11 Mar 2015 13:34:14 +0100
14+
15 mtp (0.0.4+15.04.20150219-0ubuntu2) vivid; urgency=medium
16
17 * Properly fixing the startup script, as the previous change broke
18
19=== modified file 'debian/mtp-server.conf'
20--- debian/mtp-server.conf 2015-03-11 19:35:22 +0000
21+++ debian/mtp-server.conf 2015-03-19 13:20:48 +0000
22@@ -1,13 +1,12 @@
23 description "MTP protocol server"
24
25-start on :sys:android-usb-connected or android-usb-connected or :sys:android-mtp-on or android-mtp-on or started unity8
26-stop on :sys:android-usb-disconnected or android-usb-disconnected or :sys:android-mtp-off or android-mtp-off or desktop-end
27+start on :sys:android-usb-connected or android-usb-connected or started unity8
28+stop on :sys:android-usb-disconnected or android-usb-disconnected or desktop-end
29
30 pre-start script
31 [ "$USER" != "lightdm" ] || { stop; exit 0; }
32
33 test -e /sys/devices/virtual/android_usb/android0/state || { stop; exit 0; }
34- grep -q DISCONNECTED /sys/devices/virtual/android_usb/android0/state && { stop; exit 0; }
35 grep -q mtp /sys/devices/virtual/android_usb/android0/functions || { stop; exit 0; }
36
37 # Fix for bug LP: #1389223: UnityGreeter isn't available immediately
38
39=== modified file 'debian/mtp-server.install'
40--- debian/mtp-server.install 2015-01-20 00:54:30 +0000
41+++ debian/mtp-server.install 2015-03-19 13:20:48 +0000
42@@ -1,4 +1,3 @@
43 usr/bin/mtp-server
44 usr/share/locale
45 debian/mtp-server.conf /usr/share/upstart/sessions/
46-debian/mtp-state.conf /usr/share/upstart/sessions/
47
48=== removed file 'debian/mtp-server.mtp-state.upstart'
49--- debian/mtp-server.mtp-state.upstart 2014-03-07 19:11:20 +0000
50+++ debian/mtp-server.mtp-state.upstart 1970-01-01 00:00:00 +0000
51@@ -1,18 +0,0 @@
52-start on android-container persist.sys.usb.config=* and started lightdm
53-
54-task
55-
56-emits android-mtp-on
57-emits android-mtp-off
58-
59-script
60- VAL=$(env | grep persist.sys.usb.config=)
61- case ${VAL##*=} in
62- mtp*)
63- /sbin/initctl emit android-mtp-on
64- ;;
65- *)
66- /sbin/initctl emit android-mtp-off
67- ;;
68- esac
69-end script
70
71=== modified file 'debian/rules'
72--- debian/rules 2015-01-20 00:54:30 +0000
73+++ debian/rules 2015-03-19 13:20:48 +0000
74@@ -7,11 +7,3 @@
75
76 %:
77 dh $@ --with translations -- --fail-missing
78-
79-override_dh_installinit:
80- dh_installinit -pmtp-server --name=mtp-state --no-start -r -n
81- dh_installinit
82-
83-override_dh_install:
84- cp debian/mtp-server.mtp-state.upstart debian/mtp-state.conf
85- dh_install

Subscribers

People subscribed via source and target branches

to all changes: