Retry apt downloads 3 times

Fixes #194
This commit is contained in:
Luigi F. Cruz 2020-02-20 14:18:50 -03:00 committed by GitHub
parent 5f884374b6
commit 38d22e976a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,7 +20,7 @@ EOF
PACKAGES="$(sed -f "${SCRIPT_DIR}/remove-comments.sed" < "${i}-packages-nr")" PACKAGES="$(sed -f "${SCRIPT_DIR}/remove-comments.sed" < "${i}-packages-nr")"
if [ -n "$PACKAGES" ]; then if [ -n "$PACKAGES" ]; then
on_chroot << EOF 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 EOF
fi fi
log "End ${SUB_STAGE_DIR}/${i}-packages-nr" log "End ${SUB_STAGE_DIR}/${i}-packages-nr"
@ -30,7 +30,7 @@ EOF
PACKAGES="$(sed -f "${SCRIPT_DIR}/remove-comments.sed" < "${i}-packages")" PACKAGES="$(sed -f "${SCRIPT_DIR}/remove-comments.sed" < "${i}-packages")"
if [ -n "$PACKAGES" ]; then if [ -n "$PACKAGES" ]; then
on_chroot << EOF on_chroot << EOF
apt-get install -y $PACKAGES apt-get -o APT::Acquire::Retries=3 install -y $PACKAGES
EOF EOF
fi fi
log "End ${SUB_STAGE_DIR}/${i}-packages" log "End ${SUB_STAGE_DIR}/${i}-packages"