~mwhudson/lava-deployment-tool/add-upgrade-staging-script

« back to all changes in this revision

Viewing changes to lava-deployment-tool

  • Committer: Michael Hudson-Doyle
  • Date: 2012-03-15 23:27:28 UTC
  • mfrom: (153.1.2 add-upgrade-preview)
  • Revision ID: michael.hudson@linaro.org-20120315232728-evwq61wok3j5tkv3
add a command that shows what an upgrade will do in terms of package versions

Show diffs side-by-side

added added

removed removed

Lines of Context:
1629
1629
    rm -f "$LAVA_FULL_REQUIREMENT"
1630
1630
}
1631
1631
 
 
1632
cmd_preview () {
 
1633
    export LAVA_INSTANCE=$1
 
1634
    export LAVA_BUNDLE=$2
 
1635
 
 
1636
    check_min_version
 
1637
 
 
1638
    _bundle="$(readlink -f $LAVA_BUNDLE)"
 
1639
    _tmpdir="$(mktemp -d)"
 
1640
 
 
1641
    trap "rm -rf \"${_tmpdir}\"" EXIT
 
1642
 
 
1643
    cd "${_tmpdir}"
 
1644
 
 
1645
    unzip -qc "${_bundle}" pip-manifest.txt | grep -v '^#' | tr '[A-Z]' '[a-z]' | sort > bundle-versions.txt
 
1646
    $LAVA_PREFIX/$LAVA_INSTANCE/bin/pip freeze | tr '[A-Z]' '[a-z]' | sort > installed-versions.txt
 
1647
 
 
1648
    diff -y installed-versions.txt bundle-versions.txt
 
1649
}
1632
1650
 
1633
1651
main() {
1634
1652
    os_check
1675
1693
        setup)
1676
1694
            cmd_setup "$@"
1677
1695
            ;;
1678
 
        install|upgrade|remove)
 
1696
        install|upgrade|remove|preview)
1679
1697
            cmd_$cmd "$@" # 2>&1 | tee "$cmd-log-for-instance-$LAVA_INSTANCE.log"
1680
1698
            ;;
1681
1699
        manage)