Merge lp:~mterry/phablet-tools/welcome-wizard-disable into lp:phablet-tools

Proposed by Michael Terry
Status: Merged
Approved by: Michael Terry
Approved revision: 288
Merged at revision: 284
Proposed branch: lp:~mterry/phablet-tools/welcome-wizard-disable
Merge into: lp:phablet-tools
Diff against target: 75 lines (+38/-1)
3 files modified
debian/changelog (+8/-0)
phablet-bootchart (+5/-1)
phablet-config (+25/-0)
To merge this branch: bzr merge lp:~mterry/phablet-tools/welcome-wizard-disable
Reviewer Review Type Date Requested Status
Francis Ginther Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+223766@code.launchpad.net

Commit message

Add support for "phablet-config welcome-wizard --enable" or "phablet-config welcome-wizard --disable". Note that you'll need ubuntu-system-settings-wizard installed for this to mean anything.

Description of the change

Add support for "phablet-config welcome-wizard --enable" or "phablet-config welcome-wizard --disable". Note that you'll need ubuntu-system-settings-wizard installed for this to mean anything.

I also edited the bootchart script to disable the wizard.

To post a comment you must log in.
286. By Michael Terry

Bump version so other packages can depend on this one for welcome-wizard argument

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
287. By Michael Terry

fix typo

288. By Michael Terry

Fix pep8 line being too long

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Francis Ginther (fginther) wrote :

I discussed this with the CI team and we don't have any comments on the actual code changes, just some questions on some possible implications:

1) Is this a no-op if ubuntu-system-settings-wizard is not available? I'm just making sure this change doesn't need to be in lock-step with some other change.

2) Are there cases when we don't want to disable this wizard? I can see that for all of our current testing this is needed. Do we have a testing gap for this wizard that we eventually need to cover?

3) Just to make a note, it would be helpful to have a single option which disabled both the intro and the welcome-wizard and could be used as an umbrella option for any other tweak that needs to be done before automated tests can run. But I can see this being outside the scope of this MP and don't want to bog this one down.

review: Needs Information
Revision history for this message
Michael Terry (mterry) wrote :

1) Is this a no-op if ubuntu-system-settings-wizard is not available? I'm just making sure this change doesn't need to be in lock-step with some other change.

- Yes, it's a no-op. Just adds/removes a file that only the wizard looks at.

2) Are there cases when we don't want to disable this wizard? I can see that for all of our current testing this is needed. Do we have a testing gap for this wizard that we eventually need to cover?

- Maybe? I think for AP tests, we can just add/remove the file in the AP test and restart the upstart job with testability. So it should be fine that for all our current testing we disable it.

3) Just to make a note, it would be helpful to have a single option which disabled both the intro and the welcome-wizard and could be used as an umbrella option for any other tweak that needs to be done before automated tests can run. But I can see this being outside the scope of this MP and don't want to bog this one down.

- Agreed on all points.

Revision history for this message
Francis Ginther (fginther) wrote :

Thanks for the responses, this all looks reasonable.

review: Approve

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 2014-06-16 19:16:47 +0000
3+++ debian/changelog 2014-06-19 15:10:26 +0000
4@@ -1,3 +1,11 @@
5+phablet-tools (1.1) UNRELEASED; urgency=medium
6+
7+ * phablet-config: Add support for "welcome-wizard --enable" or
8+ "welcome-wizard --disable". Note that you'll need
9+ ubuntu-system-settings-wizard installed for this to mean anything.
10+
11+ -- Michael Terry <mterry@ubuntu.com> Thu, 19 Jun 2014 11:02:03 -0400
12+
13 phablet-tools (1.0+14.10.20140616-0ubuntu1) utopic; urgency=low
14
15 [ Oliver Grawert ]
16
17=== modified file 'phablet-bootchart'
18--- phablet-bootchart 2014-04-14 17:06:36 +0000
19+++ phablet-bootchart 2014-06-19 15:10:26 +0000
20@@ -119,9 +119,13 @@
21 ERROR="could not install bootchart package" exit 1
22 reboot_and_wait 30
23
24+echo "Disabling Welcome Wizard"
25+phablet-config welcome-wizard --disable || \
26+ ERROR="could not disable welcome wizard" exit 1
27+
28 echo "Disabling Intro Demo"
29 phablet-config edges-intro --disable || \
30- ERROR="could disable intro" exit 1
31+ ERROR="could not disable intro" exit 1
32
33 echo "Rebooting three times to get accurate data"
34 reboot_and_wait 60
35
36=== modified file 'phablet-config'
37--- phablet-config 2013-12-12 23:45:16 +0000
38+++ phablet-config 2014-06-19 15:10:26 +0000
39@@ -190,6 +190,22 @@
40 adb.shell(setter)
41
42
43+def _handle_welcome_wizard(adb, args):
44+ config_dir = '/home/phablet/.config/ubuntu-system-settings'
45+ ran_file = config_dir + '/wizard-has-run'
46+
47+ enabled = adb.shell('ls %s' % ran_file).strip() != ran_file
48+ if args.enable and enabled:
49+ print('already enabled')
50+ elif not args.enable and not enabled:
51+ print('already disabled')
52+ elif args.enable:
53+ adb.shell('rm %s' % ran_file)
54+ else:
55+ adb.shell('sudo -u phablet mkdir -p %s' % config_dir)
56+ adb.shell('sudo -u phablet touch %s' % ran_file)
57+
58+
59 def parse_arguments():
60 parser = argparse.ArgumentParser(
61 description='Set up different configuration options on a device.')
62@@ -236,6 +252,15 @@
63 help='enable edges intro')
64 ei.add_argument('--disable', action='store_false', required=False,
65 help='disable edges intro')
66+
67+ ei = sub.add_parser('welcome-wizard',
68+ help='Enable/disable the welcome wizard.')
69+ ei.set_defaults(func=_handle_welcome_wizard)
70+ ei = ei.add_mutually_exclusive_group(required=True)
71+ ei.add_argument('--enable', action='store_true', required=False,
72+ help='enable welcome wizard')
73+ ei.add_argument('--disable', action='store_false', required=False,
74+ help='disable welcome wizard')
75 return parser.parse_args()
76
77

Subscribers

People subscribed via source and target branches