diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-12-19 12:15:18 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-12-19 12:15:18 +0100 |
commit | e6ab9c407874e767fca55c684dab0e69172fd561 (patch) | |
tree | bacf0373e2b05666b0801e20f9ca19f52cb37ffd | |
parent | c8a6f0bccd2d1cc702864c36ae129153a5d9df26 (diff) | |
download | jenkins.debian.net-e6ab9c407874e767fca55c684dab0e69172fd561.tar.xz |
reproducible archlinux: be more patient and use more force to end schroot sessions
-rwxr-xr-x | bin/reproducible_build_archlinux_pkg.sh | 28 |
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 |