diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-03-13 17:55:23 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-03-13 17:55:23 +0100 |
commit | b7a303819727cd1dc33705ebdedc88eb79ae35cb (patch) | |
tree | b920dc861b8eb6b1c8b7a7ff1028ace38a72e1a6 | |
parent | 20da1c9e6d98879f61053404306e1c010919b021 (diff) | |
download | jenkins.debian.net-b7a303819727cd1dc33705ebdedc88eb79ae35cb.tar.xz |
reproducible: really fixup last two commits
-rwxr-xr-x | bin/reproducible_build.sh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index a2a12ac9..31cf7f7a 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -184,14 +184,22 @@ else update_db_and_html exit 0 else - set -e VERSION=$(grep "^Version: " ${SRCPACKAGE}_*.dsc| head -1 | egrep -v '(GnuPG v|GnuPG/MacGPG2)' | cut -d " " -f2-) # EPOCH_FREE_VERSION was too long EVERSION=$(echo $VERSION | cut -d ":" -f2) # preserve RBUILDLOG as TMPLOG, then cleanup userContent from previous builds, # and then access RBUILDLOG with it's correct name (=eversion) TMPLOG=$(mktemp) - mv ${RBUILDLOG} ${TMPLOG} || { echo "Warning, package ${SRCPACKAGE} in ${SUITE} on ${ARCH} is probably already building elsewhere, exiting." ; exit 0 } + # catch race conditions due to several builders trying to build the same package + mv ${RBUILDLOG} ${TMPLOG} + RESULT=$? + if [ $RESULT -ne 0 ] ; then + echo "Warning, package ${SRCPACKAGE} in ${SUITE} on ${ARCH} is probably already building elsewhere, exiting." + echo "Warning, package ${SRCPACKAGE} in ${SUITE} on ${ARCH} is probably already building elsewhere, exiting. Please check $BUILD_URL" | mail -s "race condition found" qa-jenkins-scm@lists.alioth.debian.org + exit 0 + fi + set -e + cleanup_userContent RBUILDLOG=/var/lib/jenkins/userContent/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_${EVERSION}.rbuild.log mv ${TMPLOG} ${RBUILDLOG} |