Merge lp:~lool/ubuntu/saucy/lxc-android-config/set-display-mir into lp:ubuntu/saucy/lxc-android-config

Proposed by Loïc Minier
Status: Merged
Merged at revision: 111
Proposed branch: lp:~lool/ubuntu/saucy/lxc-android-config/set-display-mir
Merge into: lp:ubuntu/saucy/lxc-android-config
Diff against target: 58 lines (+46/-0)
2 files modified
debian/changelog (+10/-0)
etc/init/boot-hooks/set-display-mir.conf (+36/-0)
To merge this branch: bzr merge lp:~lool/ubuntu/saucy/lxc-android-config/set-display-mir
Reviewer Review Type Date Requested Status
Sergio Schvezov Approve
Ubuntu Development Team Pending
Review via email: mp+189986@code.launchpad.net

Description of the change

Add set-display-mir boot-hook to create .display-mir file on boot, unless the hook already ran; switches the default to Mir for users of SF on system-upgrades; this should only run once on upgrades, but the current boot-hooks don't allow this with a dep on other jobs.

To post a comment you must log in.
Revision history for this message
Loïc Minier (lool) wrote :

Tested by booting without .display-mir, it got added along .set-display-mir-done and Mir was used.

Then removing .display-mir + rebooting, and SF came up.

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

XXX not sure if this is a placeholder for a bug or something

review: Approve
Revision history for this message
Loïc Minier (lool) wrote :

XXX is indeed for a boot-hooks bug that we can't listen for "new-version", only for "every-boot" which is suboptimal, but works.

111. By Loïc Minier

Only touch .display-mir on supported devices: grouper, maguro, mako.

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 2013-10-04 16:56:28 +0000
3+++ debian/changelog 2013-10-09 00:18:09 +0000
4@@ -1,3 +1,13 @@
5+lxc-android-config (0.110) saucy; urgency=low
6+
7+ * Add set-display-mir boot-hook to create .display-mir file on boot (on
8+ supported devices), unless the hook already ran; switches the default to
9+ Mir for users of SF on system-upgrades; this should only run once on
10+ upgrades, but the current boot-hooks don't allow this with a dep on other
11+ jobs.
12+
13+ -- Loïc Minier <loic.minier@ubuntu.com> Tue, 08 Oct 2013 23:16:18 +0200
14+
15 lxc-android-config (0.109) saucy; urgency=low
16
17 * rework teh former change slightly so prerequisites for the job are
18
19=== added file 'etc/init/boot-hooks/set-display-mir.conf'
20--- etc/init/boot-hooks/set-display-mir.conf 1970-01-01 00:00:00 +0000
21+++ etc/init/boot-hooks/set-display-mir.conf 2013-10-09 00:18:09 +0000
22@@ -0,0 +1,36 @@
23+# set-display-mir - creates .display-mir file once (on supported devices)
24+
25+author "Loïc Minier <loic.minier@ubuntu.com>"
26+description "Creates .display-mir file once"
27+
28+# start when first boot-hooks event is emitted and before lxc-android-config
29+# starts as it disables SurfaceFlinger based on the Mir flag
30+start on boot-hooks and starting lxc-android-config
31+
32+# NOT a task as otherwise this would block restarting lxc-android-config
33+
34+setuid phablet
35+setgid phablet
36+chdir /home/phablet
37+env FLAG=.set-display-mir-done
38+env DISPLAY_MIR=.display-mir
39+
40+# work needs to be done in pre-start as this really is a job with nothing to
41+# start
42+pre-start script
43+ # XXX this is what we should be using, but this job gets started with
44+ # "WHEN=every-boot" and then doesn't get the second event for
45+ # "WHEN=new-version"
46+ #if [ "$WHEN" = "new-version" ] && [ ! -e "$FLAG" ]; then
47+ if [ ! -e "$FLAG" ]; then
48+ # only enable on supported devices
49+ case "$(getprop ro.product.model)" in
50+ grouper|maguro|mako)
51+ touch "$DISPLAY_MIR"
52+ ;;
53+ esac
54+
55+ touch "$FLAG"
56+ fi
57+end script
58+

Subscribers

People subscribed via source and target branches

to all changes: