From 38d22e976a2d6ad2ccabc2704c966f586550122c Mon Sep 17 00:00:00 2001 From: "Luigi F. Cruz" Date: Thu, 20 Feb 2020 14:18:50 -0300 Subject: [PATCH] Retry apt downloads 3 times Fixes #194 --- build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index a906e10..e012569 100755 --- a/build.sh +++ b/build.sh @@ -20,7 +20,7 @@ EOF PACKAGES="$(sed -f "${SCRIPT_DIR}/remove-comments.sed" < "${i}-packages-nr")" if [ -n "$PACKAGES" ]; then on_chroot << EOF -apt-get install --no-install-recommends -y $PACKAGES +apt-get -o APT::Acquire::Retries=3 install --no-install-recommends -y $PACKAGES EOF fi log "End ${SUB_STAGE_DIR}/${i}-packages-nr" @@ -30,7 +30,7 @@ EOF PACKAGES="$(sed -f "${SCRIPT_DIR}/remove-comments.sed" < "${i}-packages")" if [ -n "$PACKAGES" ]; then on_chroot << EOF -apt-get install -y $PACKAGES +apt-get -o APT::Acquire::Retries=3 install -y $PACKAGES EOF fi log "End ${SUB_STAGE_DIR}/${i}-packages"