mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-05 18:50:09 +02:00
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.
This commit is contained in:
parent
7b64bdcf0b
commit
91c1e8313f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user