From e6ab9c407874e767fca55c684dab0e69172fd561 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sat, 19 Dec 2015 12:15:18 +0100 Subject: reproducible archlinux: be more patient and use more force to end schroot sessions --- bin/reproducible_build_archlinux_pkg.sh | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'bin/reproducible_build_archlinux_pkg.sh') 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 -- cgit v1.2.3-54-g00ecf