diff --git a/scripts/amazon_ebs_image_inner_chroot_script.sh b/scripts/amazon_ebs_image_inner_chroot_script.sh index bffc0b7..774b118 100755 --- a/scripts/amazon_ebs_image_inner_chroot_script.sh +++ b/scripts/amazon_ebs_image_inner_chroot_script.sh @@ -4,10 +4,16 @@ rm -f /var/run/entropy/entropy.lock export FORCE_EAPI=2 -equo update -if [ "${?}" != "0" ]; then - sleep 1200 || exit 1 - equo update || exit 1 +updated=0 +for ((i=0; i < 6; i++)); do + equo update && { + updated=1; + break; + } + sleep 1200 || exit 1 +done +if [ "${updated}" = "0" ]; then + exit 1 fi # disable all mirrors but GARR diff --git a/scripts/inner_source_chroot_update.sh b/scripts/inner_source_chroot_update.sh index 3b11d75..f5c8936 100755 --- a/scripts/inner_source_chroot_update.sh +++ b/scripts/inner_source_chroot_update.sh @@ -9,13 +9,20 @@ if [ -d "/usr/portage/licenses" ]; then export ACCEPT_LICENSE="$(ls /usr/portage/licenses -1 | xargs)" fi -export ETP_NOINTERACTIVE=1 export FORCE_EAPI=2 -equo update -if [ "${?}" != "0" ]; then +updated=0 +for ((i=0; i < 6; i++)); do + equo update && { + updated=1; + break; + } sleep 1200 || exit 1 - equo update || exit 1 +done +if [ "${updated}" = "0" ]; then + exit 1 fi + +export ETP_NOINTERACTIVE=1 equo upgrade || exit 1 echo "-5" | equo conf update rm -rf /var/lib/entropy/client/packages diff --git a/scripts/remaster_generic_inner_chroot_script.sh b/scripts/remaster_generic_inner_chroot_script.sh index b10bd6d..a0a1082 100755 --- a/scripts/remaster_generic_inner_chroot_script.sh +++ b/scripts/remaster_generic_inner_chroot_script.sh @@ -4,10 +4,16 @@ rm -f /var/run/entropy/entropy.lock export FORCE_EAPI=2 -equo update -if [ "${?}" != "0" ]; then - sleep 1200 || exit 1 - equo update || exit 1 +updated=0 +for ((i=0; i < 6; i++)); do + equo update && { + updated=1; + break; + } + sleep 1200 || exit 1 +done +if [ "${updated}" = "0" ]; then + exit 1 fi # disable all mirrors but GARR