Merge lp:~robru/phablet-tools/citrain into lp:phablet-tools

Proposed by Robert Bruce Park
Status: Merged
Approved by: Sergio Schvezov
Approved revision: 273
Merged at revision: 274
Proposed branch: lp:~robru/phablet-tools/citrain
Merge into: lp:phablet-tools
Diff against target: 179 lines (+121/-1)
7 files modified
citrain-purge (+27/-0)
citrain-push (+31/-0)
citrain-slurp (+33/-0)
debian/control (+21/-1)
debian/phablet-tools-citrain.install (+1/-0)
debian/phablet-tools.install (+5/-0)
setup.py (+3/-0)
To merge this branch: bzr merge lp:~robru/phablet-tools/citrain
Reviewer Review Type Date Requested Status
Sergio Schvezov Approve
PS Jenkins bot continuous-integration Approve
Oliver Grawert Needs Fixing
Review via email: mp+219268@code.launchpad.net

Commit message

Add scripts to ease interactions with CI Train silos.

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
Oliver Grawert (ogra) wrote :

please use ppa-purge to remove the ppa stuff from the machine (needs a package dependency too), the current code only removes the sources.list.d entry but leaves the keys dangling around ...

review: Needs Fixing
Revision history for this message
Robert Bruce Park (robru) wrote :

Thanks for your feedback ogra. The thing is, citrain-slurp can't just ppa-purge at the end of the script because it needs to leave those packages installed on purpose, so you can actually test them.

What I'll do is add a third script, citrain-purge which similarly takes a 3-digit silo number, then calls ppa-purge for you.

lp:~robru/phablet-tools/citrain updated
271. By Robert Bruce Park

Add citrain-purge tool.

Revision history for this message
Oliver Grawert (ogra) wrote :

sounds good :)

lp:~robru/phablet-tools/citrain updated
272. By Robert Bruce Park

Do zero-padding so users don't have to.

Revision history for this message
Robert Bruce Park (robru) wrote :

Ok ogra, citrain-purge added, and I also added printf statements so that the users don't need to type 3-digit silo numbers anymore (yay less typing!)

Please approve ;-)

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
lp:~robru/phablet-tools/citrain updated
273. By Robert Bruce Park

Split citrain scripts into separate -citrain package.

Revision history for this message
Robert Bruce Park (robru) wrote :

Alright guys, I created a new binary package for this. Let me know what you think now.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Sergio Schvezov (sergiusens) :
review: Approve
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

we will need to work out the multiple devices and emulator scenarios, but this is good for now.

review: Approve
Revision history for this message
Robert Bruce Park (robru) wrote :

Thanks sergio! I'll pursue landing this a bit later once we're less crunched for silos.

lp:~robru/phablet-tools/citrain updated
274. By Robert Bruce Park

Fix FTBFS.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'citrain-purge'
2--- citrain-purge 1970-01-01 00:00:00 +0000
3+++ citrain-purge 2014-05-15 20:01:23 +0000
4@@ -0,0 +1,27 @@
5+#!/bin/sh -e
6+# This program is free software: you can redistribute it and/or modify it
7+# under the terms of the the GNU General Public License version 3, as
8+# published by the Free Software Foundation.
9+#
10+# This program is distributed in the hope that it will be useful, but
11+# WITHOUT ANY WARRANTY; without even the implied warranties of
12+# MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
13+# PURPOSE. See the applicable version of the GNU General Public
14+# License for more details.
15+#.
16+# You should have received a copy of the GNU General Public License
17+# along with this program. If not, see <http://www.gnu.org/licenses/>.
18+#
19+# Copyright (C) 2014 Canonical, Ltd.
20+
21+if ! echo $1 | egrep -q "^[0-9]{1,3}$"; then
22+ echo "This tool will revert all binary packages from a CI Train silo back to"
23+ echo "the stock packages available to the host machine."
24+ echo
25+ echo "Usage: $0 [silo number]"
26+ exit 1
27+fi
28+
29+silo_number=$(printf "%03d" $1)
30+
31+sudo ppa-purge ppa:ci-train-ppa-service/landing-$silo_number
32
33=== added file 'citrain-push'
34--- citrain-push 1970-01-01 00:00:00 +0000
35+++ citrain-push 2014-05-15 20:01:23 +0000
36@@ -0,0 +1,31 @@
37+#!/bin/sh -e
38+# This program is free software: you can redistribute it and/or modify it
39+# under the terms of the the GNU General Public License version 3, as
40+# published by the Free Software Foundation.
41+#
42+# This program is distributed in the hope that it will be useful, but
43+# WITHOUT ANY WARRANTY; without even the implied warranties of
44+# MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
45+# PURPOSE. See the applicable version of the GNU General Public
46+# License for more details.
47+#.
48+# You should have received a copy of the GNU General Public License
49+# along with this program. If not, see <http://www.gnu.org/licenses/>.
50+#
51+# Copyright (C) 2014 Canonical, Ltd.
52+
53+if ! echo $1 | egrep -q "^[0-9]{1,3}$"; then
54+ echo "This tool will install all binary packages from a CI Train silo onto"
55+ echo "a connected Ubuntu Touch device."
56+ echo
57+ echo "Usage: $0 [silo number]"
58+ exit 1
59+fi
60+
61+silo_number=$(printf "%03d" $1)
62+
63+wget -qO- http://ppa.launchpad.net/ci-train-ppa-service/landing-$silo_number/ubuntu/dists/devel/main/source/Sources \
64+ | perl -ne 'chomp; s/, / -p /g; s/^Binary: / -p / && print' \
65+ | xargs phablet-config writable-image \
66+ --ppa ppa:ci-train-ppa-service/landing-$silo_number
67+adb reboot
68
69=== added file 'citrain-slurp'
70--- citrain-slurp 1970-01-01 00:00:00 +0000
71+++ citrain-slurp 2014-05-15 20:01:23 +0000
72@@ -0,0 +1,33 @@
73+#!/bin/sh -e
74+# This program is free software: you can redistribute it and/or modify it
75+# under the terms of the the GNU General Public License version 3, as
76+# published by the Free Software Foundation.
77+#
78+# This program is distributed in the hope that it will be useful, but
79+# WITHOUT ANY WARRANTY; without even the implied warranties of
80+# MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
81+# PURPOSE. See the applicable version of the GNU General Public
82+# License for more details.
83+#.
84+# You should have received a copy of the GNU General Public License
85+# along with this program. If not, see <http://www.gnu.org/licenses/>.
86+#
87+# Copyright (C) 2014 Canonical, Ltd.
88+
89+if ! echo $1 | egrep -q "^[0-9]{1,3}$"; then
90+ echo "This tool will install all binary packages from a CI Train silo onto"
91+ echo "the host machine."
92+ echo
93+ echo "Usage: $0 [silo number]"
94+ exit 1
95+fi
96+
97+silo_number=$(printf "%03d" $1)
98+
99+sudo add-apt-repository ppa:ci-train-ppa-service/landing-$silo_number
100+sudo apt-get update -qq
101+wget -qO- http://ppa.launchpad.net/ci-train-ppa-service/landing-$silo_number/ubuntu/dists/devel/main/source/Sources \
102+ | perl -ne 's/,//g; s/^Binary: // && print' \
103+ | xargs sudo apt-get install --yes
104+sudo rm -rf /etc/apt/sources.list.d/ci-train*
105+sudo apt-get update -qq
106
107=== modified file 'debian/control'
108--- debian/control 2014-04-05 17:01:01 +0000
109+++ debian/control 2014-05-15 20:01:23 +0000
110@@ -14,7 +14,7 @@
111 python-testscenarios,
112 python-testtools,
113 python-xdg,
114-Standards-Version: 3.9.4
115+Standards-Version: 3.9.5
116 Section: admin
117 # If you aren't a member of ~phablet-team but need to upload
118 # packaging changes, just go ahead. ~phablet-team will notice
119@@ -46,6 +46,8 @@
120 pybootchartgui,
121 ubuntu-dev-tools,
122 ubuntu-device-flash,
123+Suggests:
124+ phablet-tools-citrain
125 Description: Scripts to work with Phablet.
126 Installs Touch Developer Preview on Nexus devices, specifically the following:
127 - Galaxy Nexus
128@@ -54,3 +56,21 @@
129 - Nexus 10
130 .
131 Additional tools included to bootstrap from source and setup networking
132+
133+Package: phablet-tools-citrain
134+Section: admin
135+Architecture: all
136+Depends:
137+ android-tools-adb (>= 4.2.2),
138+ apt,
139+ ppa-purge,
140+ wget,
141+ ${misc:Depends},
142+ ${perl:Depends},
143+Recommends:
144+ ubuntu-dev-tools,
145+ ubuntu-device-flash,
146+Description: Scripts to work with CI Train silos (PPAs).
147+ Provides citrain-push, citrain-purge, and citrain-slurp for installing
148+ and removing binary packages from CI Train silos on either your host system
149+ or connected Ubuntu Touch device.
150
151=== added file 'debian/phablet-tools-citrain.install'
152--- debian/phablet-tools-citrain.install 1970-01-01 00:00:00 +0000
153+++ debian/phablet-tools-citrain.install 2014-05-15 20:01:23 +0000
154@@ -0,0 +1,1 @@
155+usr/bin/citrain-*
156
157=== added file 'debian/phablet-tools.install'
158--- debian/phablet-tools.install 1970-01-01 00:00:00 +0000
159+++ debian/phablet-tools.install 2014-05-15 20:01:23 +0000
160@@ -0,0 +1,5 @@
161+usr/bin/click-buddy
162+usr/bin/phablet-*
163+usr/bin/repo
164+usr/lib/*
165+usr/share/phabletutils/*
166
167=== modified file 'setup.py'
168--- setup.py 2014-04-05 17:01:01 +0000
169+++ setup.py 2014-05-15 20:01:23 +0000
170@@ -13,6 +13,9 @@
171 ]
172
173 SH_SCRIPTS = [
174+ 'citrain-purge',
175+ 'citrain-push',
176+ 'citrain-slurp',
177 'phablet-network',
178 'phablet-screenshot',
179 'phablet-test-run',

Subscribers

People subscribed via source and target branches