[Merge] lp:~robru/phablet-tools/citrain-on-rtm into lp:phablet-tools
Brendan Donegan
brendan.donegan at canonical.com
Wed Sep 24 23:36:12 UTC 2014
Review: Needs Fixing
I'll test this - although it seems like it should work. Just two things inline.
Diff comments:
> === modified file 'citrain'
> --- citrain 2014-08-20 01:30:24 +0000
> +++ citrain 2014-09-24 23:21:30 +0000
> @@ -16,7 +16,7 @@
>
> usage () {
> cat <<EOF
> -usage: $0 COMMAND SILO-NUMBER
> +usage: $0 COMMAND SILO-NUMBER [DEVICE-PASSWORD]
>
> COMMANDS:
> host-install Deprecated. Please use host-upgrade instead.
> @@ -43,8 +43,6 @@
>
> # Defaults
> PPA="ppa:ci-train-ppa-service"
> -HTTP="http://ppa.launchpad.net/ci-train-ppa-service"
> -SOURCES="ubuntu/dists/devel/main/source/Sources"
>
> # Read the first positional argument.
> COMMAND="$1"
> @@ -75,12 +73,23 @@
>
> device-upgrade)
> check_devices
> - echo "These PPAs are enabled on the device:"
> + # Read the third positional argument.
> + PASSWORD="$1"
> + [ $# -gt 0 ] && shift || usage
> +
> set -x
> - adb shell egrep ^deb /etc/apt/sources.list.d/\*.list
> - phablet-config writable-image --ppa $PPA/$SILO
> - adb shell sudo apt-get -o Dir::Etc::SourceList=/dev/null update
> - adb shell sudo apt-get dist-upgrade --yes
> + phablet-config writable-image -r $PASSWORD
> + adb shell "echo -e '#\x21/bin/sh\necho $PASSWORD' >/tmp/askpass.sh"
> + adb shell chmod +x /tmp/askpass.sh
> + if adb shell system-image-cli -i | grep -q ubuntu-rtm; then
> + DISTRO="ubuntu-rtm"
> + else
> + DISTRO="ubuntu"
> + fi
> + adb shell SUDO_ASKPASS=/tmp/askpass.sh sudo -A add-apt-repository $PPA/$DISTRO/$SILO
Why not pass --ppa=$PPA/$DISTRO/$SILO to phablet-config writable-image instead of calling that seperately?
> + adb shell SUDO_ASKPASS=/tmp/askpass.sh sudo -A apt-get -o Dir::Etc::SourceList=/dev/null update
> + adb shell SUDO_ASKPASS=/tmp/askpass.sh sudo -A apt-get dist-upgrade --yes --force-yes
I don't think --force-yes is necessary any more and might even be a little unsafe since we should be dealing with a PPA whose key we have received already.
> + adb shell rm -f /tmp/askpass.sh
> adb reboot
> ;;
>
>
--
https://code.launchpad.net/~robru/phablet-tools/citrain-on-rtm/+merge/235069
Your team Ubuntu Phablet Team is subscribed to branch lp:phablet-tools.
More information about the Ubuntu-reviews
mailing list