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

Subscribers

People subscribed via source and target branches

to all changes: