summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-12-19 12:15:18 +0100
committerHolger Levsen <holger@layer-acht.org>2015-12-19 12:15:18 +0100
commite6ab9c407874e767fca55c684dab0e69172fd561 (patch)
treebacf0373e2b05666b0801e20f9ca19f52cb37ffd
parentc8a6f0bccd2d1cc702864c36ae129153a5d9df26 (diff)
downloadjenkins.debian.net-e6ab9c407874e767fca55c684dab0e69172fd561.tar.xz
reproducible archlinux: be more patient and use more force to end schroot sessions
-rwxr-xr-xbin/reproducible_build_archlinux_pkg.sh28
1 files changed, 20 insertions, 8 deletions
diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh
index 3cf3eeab..d7540df2 100755
--- a/bin/reproducible_build_archlinux_pkg.sh
+++ b/bin/reproducible_build_archlinux_pkg.sh
@@ -141,12 +141,18 @@ first_build() {
schroot --end-session -c $SESSION | tee -a $LOG
PRESULT=${PIPESTATUS[0]}
if [ $PRESULT -ne 0 ] ; then
- echo "$(date -u) - could not end schroot session, maybe some processes are still running? Sleeping 30 seconds and trying again…" | tee -a $LOG
- sleep 30
- schroot --end-session -c $SESSION | tee -a $LOG
+ echo "$(date -u) - could not end schroot session, maybe some processes are still running? Sleeping 60 seconds and trying again…" | tee -a $LOG
+ sleep 60
+ schroot --end-session -f -c $SESSION | tee -a $LOG
P2RESULT=${PIPESTATUS[0]}
if [ $P2RESULT -ne 0 ] ; then
- exit 23
+ echo "$(date -u) - could not end schroot session even with force. Sleeping 10 seconds and trying once more…" | tee -a $LOG
+ sleep 10
+ schroot --end-session -f -c $SESSION | tee -a $LOG
+ P3RESULT=${PIPESTATUS[0]}
+ if [ $P3RESULT -ne 0 ] ; then
+ exit 23
+ fi
fi
fi
if ! "$DEBUG" ; then set +x ; fi
@@ -185,12 +191,18 @@ second_build() {
schroot --end-session -c $SESSION | tee -a $LOG
PRESULT=${PIPESTATUS[0]}
if [ $PRESULT -ne 0 ] ; then
- echo "$(date -u) - could not end schroot session, maybe some processes are still running? Sleeping 30 seconds and trying again…" | tee -a $LOG
- sleep 30
- schroot --end-session -c $SESSION | tee -a $LOG
+ echo "$(date -u) - could not end schroot session, maybe some processes are still running? Sleeping 60 seconds and trying again…" | tee -a $LOG
+ sleep 60
+ schroot --end-session -f -c $SESSION | tee -a $LOG
P2RESULT=${PIPESTATUS[0]}
if [ $P2RESULT -ne 0 ] ; then
- exit 23
+ echo "$(date -u) - could not end schroot session even with force. Sleeping 10 seconds and trying once more…" | tee -a $LOG
+ sleep 10
+ schroot --end-session -f -c $SESSION | tee -a $LOG
+ P3RESULT=${PIPESTATUS[0]}
+ if [ $P3RESULT -ne 0 ] ; then
+ exit 23
+ fi
fi
fi
if ! "$DEBUG" ; then set +x ; fi