manage-tools: run apt-get update before attempting to install something, a container might not have latest or any package list

This commit is contained in:
Michael Rodler 2018-04-20 15:07:22 +02:00 committed by Yan
parent 3d71d79c97
commit 3f21e29053

View file

@ -57,6 +57,7 @@ function base_build_setup_debian()
{
PACKAGE_REQS="build-essential libtool g++ gcc texinfo curl wget automake autoconf python python-dev git subversion unzip virtualenvwrapper lsb-release"
PACKAGE_COUNT=$(echo $PACKAGE_REQS | tr ' ' '\n' | wc -l)
sudo apt-get update
if [ $(dpkg -l $PACKAGE_REQS | grep "^ii" | wc -l) -ne $PACKAGE_COUNT ]
then
if [ "$ALLOW_SUDO" -eq 1 ]; then