From: Hans-Christoph Steiner Date: Tue, 6 Sep 2016 12:33:13 +0000 (+0200) Subject: buildserver: download apt package first to increase reliability X-Git-Tag: 0.8~165^2~1 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=91c1e8313f44e94e594befe094c687fdbca010af;p=fdroidserver.git buildserver: download apt package first to increase reliability This does not have the careful result rechecking that chef has, when it installs each package in the list one at a time. So to help with failures caused by a package failing to download, first try downloading all the package, then run the install. The install pass will try to download any missing packages. Really, this should use ansible or perhaps chef again since those include lots of tricks around this stuff. --- diff --git a/buildserver/provision-apt-get-install b/buildserver/provision-apt-get-install index deeb0c66..09909050 100644 --- a/buildserver/provision-apt-get-install +++ b/buildserver/provision-apt-get-install @@ -8,6 +8,9 @@ debian_mirror=$1 sed -i "s,http://ftp.uk.debian.org/debian/,${debian_mirror},g" /etc/apt/sources.list +printf 'APT::Install-Recommends "0";\nAPT::Install-Suggests "0";\n' \ + > /etc/apt/apt.conf.d/99no-install-recommends + if grep --quiet jessie /etc/apt/sources.list; then echo "deb $debian_mirror jessie-backports main" > /etc/apt/sources.list.d/backports.list fi @@ -15,6 +18,7 @@ fi dpkg --add-architecture i386 apt-get -y update +apt-get -y upgrade --download-only apt-get -y upgrade packages=" @@ -87,8 +91,8 @@ packages=" zip zlib1g:i386 " - -apt-get install --yes --no-install-recommends $packages +apt-get install --yes $packages --download-only +apt-get install --yes $packages highestjava=`update-java-alternatives --list | sort -n | tail -1 | cut -d ' ' -f 1` update-java-alternatives --set $highestjava