From 8ca973baf5dd3c7310224304ccbfe849f0da72bc Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Mon, 15 Oct 2012 21:19:33 +0200 Subject: [PATCH] [scripts] make "equo upgrade --fetch" more fault tolerant --- scripts/inner_source_chroot_update.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/scripts/inner_source_chroot_update.sh b/scripts/inner_source_chroot_update.sh index 6aaabc9..be216fc 100755 --- a/scripts/inner_source_chroot_update.sh +++ b/scripts/inner_source_chroot_update.sh @@ -27,6 +27,21 @@ if [ "${updated}" = "0" ]; then fi export ETP_NOINTERACTIVE=1 +updated=0 +for ((i=0; i < 42; i++)); do + equo upgrade --fetch && { + updated=1; + break; + } + if [ ${i} -gt 6 ]; then + sleep 3600 || exit 1 + else + sleep 1200 || exit 1 + fi +done +if [ "${updated}" = "0" ]; then + exit 1 +fi equo upgrade || exit 1 echo "-5" | equo conf update rm -rf /var/lib/entropy/client/packages