From 321db9510cc2dafb785a3ec6d7d7068790f9e255 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Mon, 21 Dec 2015 16:36:54 +0100 Subject: reproducible archlinux: abort silently if schroot session unmounting fails on pgg verification failureā€¦ (work in progress) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/reproducible_build_archlinux_pkg.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh index 3706567a..bbeafcfb 100755 --- a/bin/reproducible_build_archlinux_pkg.sh +++ b/bin/reproducible_build_archlinux_pkg.sh @@ -151,7 +151,13 @@ first_build() { schroot --end-session -f -c $SESSION | tee -a $LOG P3RESULT=${PIPESTATUS[0]} if [ $P3RESULT -ne 0 ] ; then - exit 23 + if [ -n "$(grep 'ERROR: One or more PGP signatures could not be verified' $LOG)" ] ; then + # abort only + exit 42 + else + # fail with notification + exit 23 + fi fi fi fi @@ -228,8 +234,13 @@ remote_build() { if [ $RESULT -ne 0 ] ; then ssh -p $PORT $FQDN "rm -r $TMPDIR" || true if [ $RESULT -eq 23 ] ; then - echo "remote job could not end schroot session properly, failing loudly so we get a pointer for investigations." + echo "$(date -u) - remote job could not end schroot session properly, failing loudly so we get a pointer for investigations." exit 1 + elif [ $RESULT -eq 42 ] ; then + echo "$($date -u) - sigh, we know this problem and need to debug it and end the session cleanly. Failing silently for now." # FIXME + + exec /srv/jenkins/bin/abort.sh + else handle_remote_error "with exit code $RESULT from $NODE for build #$BUILDNR for ${SRCPACKAGE} from $REPOSITORY" fi -- cgit v1.2.3-70-g09d2