Merge lp:~robru/phablet-tools/make-useful-again into lp:phablet-tools
- make-useful-again
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Robert Bruce Park |
Approved revision: | 354 |
Merged at revision: | 345 |
Proposed branch: | lp:~robru/phablet-tools/make-useful-again |
Merge into: | lp:phablet-tools |
Diff against target: |
107 lines (+15/-25) 1 file modified
citrain (+15/-25) |
To merge this branch: | bzr merge lp:~robru/phablet-tools/make-useful-again |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Approve | |
Robert Bruce Park (community) | Approve | ||
Review via email: mp+274338@code.launchpad.net |
Commit message
Make citrain tool able to install silo packages with deps & without extras.
Description of the change
Hopefully we can restore the usefulness of citrain tool in the face of overlay PPA and "new deps in distro" challenges.
PS Jenkins bot (ps-jenkins) wrote : | # |
- 348. By Robert Bruce Park
-
Bring back autoremove.
Robert Bruce Park (robru) wrote : | # |
Ok, I tested this on silo 14 (webbrowser-app), and got the following results:
+ adb shell SUDO_ASKPASS=
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
qtdeclarative
Use 'apt-get autoremove' to remove it.
The following extra packages will be installed:
gstreamer1.
indicator-
libopencore-
liboxideqtquick0 oxideqt-
The following NEW packages will be installed:
gstreamer1.
libindicator-
The following packages will be upgraded:
indicator-
oxideqt-
qtdeclarative
webbrowser-app
10 upgraded, 5 newly installed, 0 to remove and 278 not upgraded.
Need to get 24.4 MB of archives.
After this operation, 909 kB of additional disk space will be used.
Get:1 http://
Get:2 http://
Get:3 http://
Get:4 http://
Get:5 http://
Get:6 http://
Get:7 http://
Get:8 http://
Get:9 http://
Get:10 http://
Get:11 http://
Get:12 http://
Get:13 http://
- 349. By Robert Bruce Park
-
Stop forcing ubuntu-touch.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:348
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:349
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 350. By Robert Bruce Park
-
Appease static code checker.
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:350
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Olivier Tilloy (osomon) wrote : | # |
> And, liboxideqt-
> gstreamer1.
> it's not clear to me if those are needed by the silo or not. oxide is
> related to webbrowser-app.
Silo 14 doesn’t require an oxide version bump, so the version that was already installed on the device you tested on was sufficient. Therefore I think that the upgrade shouldn’t have happened, if the tool was meant to install only packages from the silo.
Robert Bruce Park (robru) wrote : | # |
Ugh.
Thanks for clarifying.
Olivier Tilloy (osomon) wrote : | # |
> The autoremove is seemingly correct in the sense that it didn't
> uninstall the entire world, but I'm not sure if this removal is
> correct or not.
The removal is expected, that package doesn’t exist anymore (it was removed in the ota7 dev cycle).
- 351. By Robert Bruce Park
-
Use dist-upgrade again with clever pinning.
Robert Bruce Park (robru) wrote : | # |
Ok, I think I've got this, here's the results on silo 56:
The following packages will be upgraded:
libaccounts-qt5-1 libonline-
libsignon-
qml-module-
qtdeclarative
signon-
12 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 407 kB of archives.
After this operation, 2,048 B of additional disk space will be used.
Get:1 http://
Get:2 http://
Get:3 http://
Get:4 http://
Get:5 http://
Get:6 http://
Get:7 http://
Get:8 http://
Get:9 http://
Get:10 http://
Get:11 http://
Get:12 http://
Fetched 407 kB in 4s (99.6 kB/s)
So it's only installed packages from silo 56, nothing from vivid and nothing from stable snapshot ppa.
$ adb shell apt-cache policy signond
signond:
Installed: 8.58+15.
Candidate: 8.58+15.
Version table:
*** 8.58+15.
1100 http://
100 /var/lib/
8.
50 http://
8.
50 http://
this shows the correct silo pinned at 1100...
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:351
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 352. By Robert Bruce Park
-
Drop unused var.
- 353. By Robert Bruce Park
-
Appease shellcheck & check-bashisms simultaneously.
- 354. By Robert Bruce Park
-
Simplify lsb-release parsing.
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:353
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:354
http://
Executed test runs:
None: http://
None: http://
None: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:354
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Robert Bruce Park (robru) wrote : | # |
Saviq reports this is working for him also.
- 355. By Robert Bruce Park
-
Use --force-yes for maximum yesness.
Preview Diff
1 | === modified file 'citrain' | |||
2 | --- citrain 2015-09-25 18:10:53 +0000 | |||
3 | +++ citrain 2015-10-14 22:35:53 +0000 | |||
4 | @@ -8,7 +8,7 @@ | |||
5 | 8 | # MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR | 8 | # MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR |
6 | 9 | # PURPOSE. See the applicable version of the GNU General Public | 9 | # PURPOSE. See the applicable version of the GNU General Public |
7 | 10 | # License for more details. | 10 | # License for more details. |
9 | 11 | #. | 11 | # |
10 | 12 | # You should have received a copy of the GNU General Public License | 12 | # You should have received a copy of the GNU General Public License |
11 | 13 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | 13 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
12 | 14 | # | 14 | # |
13 | @@ -16,7 +16,7 @@ | |||
14 | 16 | 16 | ||
15 | 17 | usage () { | 17 | usage () { |
16 | 18 | cat <<EOF | 18 | cat <<EOF |
18 | 19 | usage: $0 COMMAND SILO-NUMBER [DEVICE-PASSWORD] [DISTRIBUTION] | 19 | usage: $0 COMMAND SILO-NUMBER [DEVICE-PASSWORD] |
19 | 20 | $1 | 20 | $1 |
20 | 21 | 21 | ||
21 | 22 | COMMANDS: | 22 | COMMANDS: |
22 | @@ -26,10 +26,6 @@ | |||
23 | 26 | device-upgrade Upgrades your connected device with packages from the silo. | 26 | device-upgrade Upgrades your connected device with packages from the silo. |
24 | 27 | host-purge Uses ppa-purge to uninstall the silo contents from the host machine. | 27 | host-purge Uses ppa-purge to uninstall the silo contents from the host machine. |
25 | 28 | device-purge Not implemented. | 28 | device-purge Not implemented. |
26 | 29 | |||
27 | 30 | DISTRIBUTION: (optional) | ||
28 | 31 | ubuntu | ||
29 | 32 | ubuntu-rtm | ||
30 | 33 | EOF | 29 | EOF |
31 | 34 | exit 1 | 30 | exit 1 |
32 | 35 | } | 31 | } |
33 | @@ -37,8 +33,9 @@ | |||
34 | 37 | [ -x /usr/bin/sudo ] || { echo "Please install 'sudo'"; exit 1; } | 33 | [ -x /usr/bin/sudo ] || { echo "Please install 'sudo'"; exit 1; } |
35 | 38 | [ -x /usr/bin/add-apt-repository ] || { echo "Please install 'software-properties-common'"; exit 1; } | 34 | [ -x /usr/bin/add-apt-repository ] || { echo "Please install 'software-properties-common'"; exit 1; } |
36 | 39 | 35 | ||
39 | 40 | if [ -f "$(dirname $0)/shell-adb-common.sh" ]; then | 36 | DIR=$(dirname "$0") |
40 | 41 | . "$(dirname $0)/shell-adb-common.sh" | 37 | if [ -f "$DIR/shell-adb-common.sh" ]; then |
41 | 38 | . "$DIR/shell-adb-common.sh" | ||
42 | 42 | else | 39 | else |
43 | 43 | . "/usr/share/phabletutils/shell-adb-common.sh" | 40 | . "/usr/share/phabletutils/shell-adb-common.sh" |
44 | 44 | fi | 41 | fi |
45 | @@ -60,7 +57,7 @@ | |||
46 | 60 | case "$COMMAND" in | 57 | case "$COMMAND" in |
47 | 61 | host-upgrade) | 58 | host-upgrade) |
48 | 62 | set -x | 59 | set -x |
50 | 63 | sudo add-apt-repository $PPA/$SILO | 60 | sudo add-apt-repository "$PPA/$SILO" |
51 | 64 | sudo apt-get update -qq | 61 | sudo apt-get update -qq |
52 | 65 | sudo apt-get dist-upgrade --yes | 62 | sudo apt-get dist-upgrade --yes |
53 | 66 | ;; | 63 | ;; |
54 | @@ -72,36 +69,29 @@ | |||
55 | 72 | [ $# -gt 0 ] && shift || usage "Missing DEVICE-PASSWORD" | 69 | [ $# -gt 0 ] && shift || usage "Missing DEVICE-PASSWORD" |
56 | 73 | 70 | ||
57 | 74 | set -x | 71 | set -x |
58 | 72 | SERIES=$(adb shell lsb_release -cs | tr -d '\r') | ||
59 | 73 | DISTRO=$(adb shell lsb_release -is | tr -d '\r' | tr '[:upper:]' '[:lower:]' | tr ' ' '-') | ||
60 | 74 | |||
61 | 75 | adb shell egrep ^deb /etc/apt/sources.list.d/\*.list | 75 | adb shell egrep ^deb /etc/apt/sources.list.d/\*.list |
62 | 76 | DISTRO="$1" | ||
63 | 77 | if [ -z $DISTRO ]; then | ||
64 | 78 | # In case no distro specified, guess | ||
65 | 79 | if adb shell system-image-cli -i | grep -q ubuntu-rtm; then | ||
66 | 80 | DISTRO="ubuntu-rtm" | ||
67 | 81 | else | ||
68 | 82 | DISTRO="ubuntu" | ||
69 | 83 | fi | ||
70 | 84 | fi | ||
71 | 85 | adb shell "echo -e '#\x21/bin/sh\necho $PASSWORD' >/tmp/askpass.sh" | 76 | adb shell "echo -e '#\x21/bin/sh\necho $PASSWORD' >/tmp/askpass.sh" |
72 | 86 | adb shell chmod +x /tmp/askpass.sh | 77 | adb shell chmod +x /tmp/askpass.sh |
73 | 87 | adb shell SUDO_ASKPASS=/tmp/askpass.sh sudo -A touch /userdata/.adb_onlock | 78 | adb shell SUDO_ASKPASS=/tmp/askpass.sh sudo -A touch /userdata/.adb_onlock |
74 | 88 | adb shell SUDO_ASKPASS=/tmp/askpass.sh sudo -A mount -o remount,rw / | 79 | adb shell SUDO_ASKPASS=/tmp/askpass.sh sudo -A mount -o remount,rw / |
76 | 89 | adb shell SUDO_ASKPASS=/tmp/askpass.sh sudo -A add-apt-repository -y $PPA/$DISTRO/$SILO | 80 | adb shell SUDO_ASKPASS=/tmp/askpass.sh sudo -A add-apt-repository -y "$PPA/$DISTRO/$SILO" |
77 | 90 | 81 | ||
78 | 91 | adb shell "test -e /usr/sbin/policy-rc.d && cp /usr/sbin/policy-rc.d /tmp/policy-rc.d" | 82 | adb shell "test -e /usr/sbin/policy-rc.d && cp /usr/sbin/policy-rc.d /tmp/policy-rc.d" |
79 | 92 | adb shell "echo 'exit 101' | SUDO_ASKPASS=/tmp/askpass.sh sudo -A tee /usr/sbin/policy-rc.d" | 83 | adb shell "echo 'exit 101' | SUDO_ASKPASS=/tmp/askpass.sh sudo -A tee /usr/sbin/policy-rc.d" |
80 | 93 | adb shell SUDO_ASKPASS=/tmp/askpass.sh sudo -A chmod +x /usr/sbin/policy-rc.d | 84 | adb shell SUDO_ASKPASS=/tmp/askpass.sh sudo -A chmod +x /usr/sbin/policy-rc.d |
83 | 94 | adb shell "echo -e 'Package: *\nPin: release o=LP-PPA-ci-train-ppa-service-$SILO\nPin-Priority: 1100' | SUDO_ASKPASS=/tmp/askpass.sh sudo -A tee /etc/apt/preferences.d/silo-$SILO.pref" | 85 | adb shell "echo -e 'Package: *\nPin: release o=*$SILO*\nPin-Priority: 1100\n\nPackage: *\nPin: release a=$SERIES*\nPin-Priority: 50' | SUDO_ASKPASS=/tmp/askpass.sh sudo -A tee /etc/apt/preferences.d/extra-ppas.pref" |
84 | 95 | adb shell SUDO_ASKPASS=/tmp/askpass.sh sudo -A apt-get -o Dir::Etc::SourceList=/dev/null update | 86 | adb shell SUDO_ASKPASS=/tmp/askpass.sh sudo -A apt-get update |
85 | 96 | 87 | ||
86 | 97 | # We need to put lxc-android-config on hold here as it's the only | 88 | # We need to put lxc-android-config on hold here as it's the only |
87 | 98 | # package which must be upgrade by hand through the recovery. See | 89 | # package which must be upgrade by hand through the recovery. See |
88 | 99 | # https://wiki.ubuntu.com/Touch/Testing/lxc-android-config for details. | 90 | # https://wiki.ubuntu.com/Touch/Testing/lxc-android-config for details. |
89 | 100 | adb shell SUDO_ASKPASS=/tmp/askpass.sh sudo -A apt-mark hold lxc-android-config | 91 | adb shell SUDO_ASKPASS=/tmp/askpass.sh sudo -A apt-mark hold lxc-android-config |
90 | 101 | 92 | ||
94 | 102 | adb shell SUDO_ASKPASS=/tmp/askpass.sh sudo -A apt-get dist-upgrade --yes | 93 | adb shell SUDO_ASKPASS=/tmp/askpass.sh sudo -A apt-get dist-upgrade --yes --force-yes |
95 | 103 | adb shell SUDO_ASKPASS=/tmp/askpass.sh sudo -A apt-get update | 94 | adb shell SUDO_ASKPASS=/tmp/askpass.sh sudo -A apt-get autoremove --yes --force-yes |
93 | 104 | adb shell SUDO_ASKPASS=/tmp/askpass.sh sudo -A apt-get autoremove --yes | ||
96 | 105 | 95 | ||
97 | 106 | adb shell "test ! -e /tmp/policy-rc.d && SUDO_ASKPASS=/tmp/askpass.sh sudo -A rm /usr/sbin/policy-rc.d" | 96 | adb shell "test ! -e /tmp/policy-rc.d && SUDO_ASKPASS=/tmp/askpass.sh sudo -A rm /usr/sbin/policy-rc.d" |
98 | 107 | adb shell "test -e /tmp/policy-rc.d && SUDO_ASKPASS=/tmp/askpass.sh sudo -A mv /tmp/policy-rc.d /usr/sbin/policy-rc.d" | 97 | adb shell "test -e /tmp/policy-rc.d && SUDO_ASKPASS=/tmp/askpass.sh sudo -A mv /tmp/policy-rc.d /usr/sbin/policy-rc.d" |
99 | @@ -113,7 +103,7 @@ | |||
100 | 113 | 103 | ||
101 | 114 | host-purge) | 104 | host-purge) |
102 | 115 | set -x | 105 | set -x |
104 | 116 | sudo ppa-purge $PPA/$SILO | 106 | sudo ppa-purge "$PPA/$SILO" |
105 | 117 | ;; | 107 | ;; |
106 | 118 | 108 | ||
107 | 119 | device-purge) | 109 | device-purge) |
FAILED: Continuous integration, rev:347 jenkins. qa.ubuntu. com/job/ phablet- tools-ci/ 453/ jenkins. qa.ubuntu. com/job/ phablet- tools-vivid- amd64-ci/ 30/console jenkins. qa.ubuntu. com/job/ phablet- tools-vivid- armhf-ci/ 30/console jenkins. qa.ubuntu. com/job/ phablet- tools-vivid- i386-ci/ 30/console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/phablet- tools-ci/ 453/rebuild
http://