summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-02-25 20:22:24 +0100
committerHolger Levsen <holger@layer-acht.org>2015-02-25 20:22:24 +0100
commit06d3011df1dc26329160922122130c1e44f1ed6f (patch)
tree118c0fec9d1d4eeb7800664ce6ca3ba6ddfecb4e /bin
parent217ea400905735f32c8ae66bf0781a7de33befda (diff)
downloadjenkins.debian.net-06d3011df1dc26329160922122130c1e44f1ed6f.tar.xz
chroot-installation: lets try to get error-correction to work...
Diffstat (limited to 'bin')
-rwxr-xr-xbin/chroot-installation.sh32
1 files changed, 16 insertions, 16 deletions
diff --git a/bin/chroot-installation.sh b/bin/chroot-installation.sh
index c2a2bc61..11a27da5 100755
--- a/bin/chroot-installation.sh
+++ b/bin/chroot-installation.sh
@@ -49,24 +49,24 @@ cleanup_all() {
}
execute_ctmpfile() {
- #set -x
+ set -x
chmod +x $CTMPFILE
- sudo chroot $CHROOT_TARGET $TMPFILE
- #set -o pipefail # see eg http://petereisentraut.blogspot.com/2010/11/pipefail.html
- #if ! $(sudo chroot $CHROOT_TARGET $TMPFILE 2>&1 | tee $TMPLOG) ; then
- # RESULT=$(egrep "Failed to fetch.*Unable to connect to" $TMPLOG || true)
- # if [ ! -z "$RESULT" ] ; then
- # echo
- # echo "Trying to workaround temporarily failure fetching packages, trying again..."
- # echo
- # sudo chroot $CHROOT_TARGET $TMPFILE
- # else
- # exit 1
- # fi
- #fi
+ #sudo chroot $CHROOT_TARGET $TMPFILE
+ set -o pipefail # see eg http://petereisentraut.blogspot.com/2010/11/pipefail.html
+ if ! $(sudo chroot $CHROOT_TARGET $TMPFILE 2>&1 | tee $TMPLOG) ; then
+ RESULT=$(egrep "Failed to fetch.*Unable to connect to" $TMPLOG || true)
+ if [ ! -z "$RESULT" ] ; then
+ echo
+ echo "Trying to workaround temporarily failure fetching packages, trying again..."
+ echo
+ sudo chroot $CHROOT_TARGET $TMPFILE
+ else
+ exit 1
+ fi
+ fi
rm $CTMPFILE
- #set +o pipefail
- #set +x
+ set +o pipefail
+ set +x
echo "Debug: This should only be printed on success."
}