Commit 6797a604 authored by intrigeri's avatar intrigeri
Browse files

Retry curl and APT operations up to 20 times to make the ISO build more robust...

Retry curl and APT operations up to 20 times to make the ISO build more robust wrt. unreliable Internet connectivity.

Thanks to Arnaud <arnaud@preev.io> for the patch!
parent 5f84783d
......@@ -35,7 +35,7 @@ download_and_verify_files() {
(
cd "${destination}"
echo "Fetching ${base_url}/${tarball} ..."
curl --remote-name "${base_url}/${tarball}"
curl --retry 20 --remote-name "${base_url}/${tarball}"
)
actual_sha256="$(sha256sum "${destination}/${tarball}" | cut -d' ' -f1)"
if [ "${actual_sha256}" != "${expected_sha256}" ]; then
......
......@@ -18,6 +18,9 @@ fi
rm -f /etc/apt/preferences.d/* /etc/apt/sources.list.d/*
# Configure apt to retry
echo 'APT::Acquire::Retries "20";' > /etc/apt/apt.conf.d/99retries
# Add our builder-jessie repository for live-build, and pin it low
echo 'deb http://deb.tails.boum.org/ builder-jessie main' > /etc/apt/sources.list.d/tails.list
sed -e 's/^[[:blank:]]*//' > /etc/apt/preferences.d/tails <<EOF
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment