diff options
author | Mattia Rizzolo <mattia@mapreri.org> | 2015-04-06 00:40:01 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-04-18 17:20:08 +0200 |
commit | 29a7145e78db2555335a2ed6bb60baf2f96eab63 (patch) | |
tree | 701e7d07d236c3c8a7827e052a71ac29256d4f07 | |
parent | b4d6ef23a889ec37b539bbc06311efe8a680bd96 (diff) | |
download | jenkins.debian.net-29a7145e78db2555335a2ed6bb60baf2f96eab63.tar.xz |
reproducible: build: refactor: WIP: something exp+untested to avoid cleaning up userContent while starting the build. Also I don't catch anymore race condition where the same package is already building. Marking as FIXME for now
-rwxr-xr-x | bin/reproducible_build.sh | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index 5ba241fd..34657276 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -223,7 +223,7 @@ START=$(date +'%s') choose_package -RBUILDLOG=/var/lib/jenkins/userContent/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_None.rbuild.log +RBUILDLOG=$(mktemp --tmpdir=$PWD) # FIXME DBDREPORT=$(echo ${SRCPACKAGE}_${EVERSION}.debbindiff.html) BUILDINFO=${SRCPACKAGE}_${EVERSION}_${ARCH}.buildinfo @@ -235,22 +235,6 @@ EVERSION=$(echo $VERSION | cut -d ":" -f2) # EPOCH_FREE_VERSION was too long - # preserve RBUILDLOG as TMPLOG, then cleanup userContent from previous builds, - # and then access RBUILDLOG with it's correct name (=eversion) - TMPLOG=$(mktemp) - # 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 and https://reproducible.debian.net/$SUITE/$ARCH/${SRCPACKAGE} for a different 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} cat ${SRCPACKAGE}_${EVERSION}.dsc | tee -a ${RBUILDLOG} # check whether the package is not for us... SUITABLE=false @@ -314,6 +298,9 @@ EVERSION=$(echo $VERSION | cut -d ":" -f2) # EPOCH_FREE_VERSION was too long sudo dcmd rm /var/cache/pbuilder/result/${SRCPACKAGE}_${EVERSION}.dsc sudo dcmd rm /var/cache/pbuilder/result/${SRCPACKAGE}_${EVERSION}_${ARCH}.changes cat b1/${SRCPACKAGE}_${EVERSION}_${ARCH}.changes | tee -a ${RBUILDLOG} + cleanup_userContent + mv $RBUILDLOG /var/lib/jenkins/userContent/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_${EVERSION}.rbuild.log + RBUIlDLOG=/var/lib/jenkins/userContent/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_${EVERSION}.rbuild.log call_debbindiff else echo "The second build failed, even though the first build was successful." | tee -a ${RBUILDLOG} |