summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--TODO1
-rwxr-xr-xbin/reproducible_build.sh8
2 files changed, 6 insertions, 3 deletions
diff --git a/TODO b/TODO
index 24708788..c6573225 100644
--- a/TODO
+++ b/TODO
@@ -113,6 +113,7 @@ See link:https://jenkins.debian.net/userContent/about.html["about jenkins.debian
* watch: zephyr (debbindiff timeout?)
* watch: haskell-hsql-odbc
* watch: cxxtest: dbd failure should be in rbuild output!
+* watch: file - debbindiff file should be deleted....
* generate .json for tracker.d.o
* reschedule all pkg tested before oct 06 00:00 UTC (we want to know if they generate .buildinfo files)
* reschedule all files with 0 length .rbuild.log files
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 2978282b..e2e6df1e 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -91,6 +91,7 @@ cleanup_all() {
}
cleanup_userContent() {
+ rm -f /var/lib/jenkins/userContent/rbuild/${SRCPACKAGE}_*.rbuild.log > /dev/null 2>&1
rm -f /var/lib/jenkins/userContent/dbd/${SRCPACKAGE}_*.debbindiff.html > /dev/null 2>&1
rm -f /var/lib/jenkins/userContent/buildinfo/${SRCPACKAGE}_*.buildinfo > /dev/null 2>&1
}
@@ -98,7 +99,6 @@ cleanup_userContent() {
cleanup_prebuild() {
rm b1 b2 -rf
rm -f ${SRCPACKAGE}_* > /dev/null 2>&1
- rm -f /var/lib/jenkins/userContent/rbuild/${SRCPACKAGE}_*.rbuild.log > /dev/null 2>&1
}
TMPDIR=$(mktemp --tmpdir=$PWD -d)
@@ -147,10 +147,14 @@ for SRCPACKAGE in ${PACKAGES} ; do
VERSION=$(grep "^Version: " ${SRCPACKAGE}_*.dsc| grep -v "GnuPG v" | sort -r | head -1 | 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}
+ cleanup_userContent
RBUILDLOG=/var/lib/jenkins/userContent/rbuild/${SRCPACKAGE}_${EVERSION}.rbuild.log
mv ${TMPLOG} ${RBUILDLOG}
+ # check whether the package is not for us...
ARCH=$(grep "^Architecture: " ${SRCPACKAGE}_*.dsc| sort -r | head -1 | cut -d " " -f2-)
if [[ ! "$ARCH" =~ "amd64" ]] && [[ ! "$ARCH" =~ "all" ]] && [[ ! "$ARCH" =~ "any" ]] && [[ ! "$ARCH" =~ "linux-amd64" ]]; then
sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO source_packages VALUES (\"${SRCPACKAGE}\", \"${VERSION}\", \"not for us\", \"$DATE\")"
@@ -178,7 +182,6 @@ for SRCPACKAGE in ${PACKAGES} ; do
echo "$(date) - debbindiff.py was killed after running into timeouot..." >> ${RBUILDLOG}
fi
if [ ! -f ./${LOGFILE} ] && [ -f b1/${BUILDINFO} ] ; then
- cleanup_userContent
cp b1/${BUILDINFO} /var/lib/jenkins/userContent/buildinfo/
figlet ${SRCPACKAGE}
echo
@@ -187,7 +190,6 @@ for SRCPACKAGE in ${PACKAGES} ; do
let "COUNT_GOOD=COUNT_GOOD+1"
GOOD="${SRCPACKAGE} ${GOOD}"
else
- cleanup_userContent
cp b1/${BUILDINFO} /var/lib/jenkins/userContent/buildinfo/ || true
mv ./${LOGFILE} /var/lib/jenkins/userContent/dbd/ || true
sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO source_packages VALUES (\"${SRCPACKAGE}\", \"${VERSION}\", \"unreproducible\", \"$DATE\")"