summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2014-09-29 16:27:41 +0200
committerHolger Levsen <holger@layer-acht.org>2014-09-29 16:27:41 +0200
commit2844b713b6703519448dcfbca89ab4892108e941 (patch)
tree7237e51374a235936e440b65399ec11194618d05
parent11b71c2c8a1070f3df3cde6158bd17ea01471259 (diff)
downloadjenkins.debian.net-2844b713b6703519448dcfbca89ab4892108e941.tar.xz
reproducible: workaround pee mixing up the exit code
-rwxr-xr-xbin/reproducible_build.sh24
1 files changed, 12 insertions, 12 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 35213643..ad647b87 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -110,19 +110,19 @@ for SRCPACKAGE in $PACKAGES ; do
fi
sudo DEB_BUILD_OPTIONS="parallel=$NUM_CPU" pbuilder --build --basetgz /var/cache/pbuilder/base-reproducible.tgz --distribution sid ${SRCPACKAGE}_*.dsc | tee ${SRCPACKAGE}_${VERSION}.pbuilder.log
RESULT=$?
- if [ $RESULT = 0 ] ; then
+ if [ -f /var/cache/pbuilder/result/${SRCPACKAGE}_${VERSION}_amd64.changes ] ; then
mkdir b1 b2
- dcmd cp /var/cache/pbuilder/result/${SRCPACKAGE}_*.changes b1
- sudo dcmd rm /var/cache/pbuilder/result/${SRCPACKAGE}_*.changes
- rm ${SRCPACKAGE}_${VERSION}.pbuilder.log /var/lib/jenkins/userContent/pbuilder/${SRCPACKAGE}_*.pbuilder.log
- sudo DEB_BUILD_OPTIONS="parallel=$NUM_CPU" pbuilder --build --basetgz /var/cache/pbuilder/base-reproducible.tgz --distribution sid ${SRCPACKAGE}_*.dsc
- dcmd cp /var/cache/pbuilder/result/${SRCPACKAGE}_*.changes b2
- sudo dcmd rm /var/cache/pbuilder/result/${SRCPACKAGE}_*.changes
+ dcmd cp /var/cache/pbuilder/result/${SRCPACKAGE}_${VERSION}_amd64.changes b1
+ sudo dcmd rm /var/cache/pbuilder/result/${SRCPACKAGE}_${VERSION}_amd64.changes
+ rm ${SRCPACKAGE}_*.pbuilder.log /var/lib/jenkins/userContent/pbuilder/${SRCPACKAGE}_*.pbuilder.log
+ sudo DEB_BUILD_OPTIONS="parallel=$NUM_CPU" pbuilder --build --basetgz /var/cache/pbuilder/base-reproducible.tgz --distribution sid ${SRCPACKAGE}_${VERSION}.dsc
+ dcmd cp /var/cache/pbuilder/result/${SRCPACKAGE}_${VERSION}_amd64.changes b2
+ sudo dcmd rm /var/cache/pbuilder/result/${SRCPACKAGE}_${VERSION}_amd64.changes
set -e
- cat b1/${SRCPACKAGE}_*.changes
- LOGFILE=$(ls ${SRCPACKAGE}_*.dsc)
+ cat b1/${SRCPACKAGE}_${VERSION}_amd64.changes
+ LOGFILE=$(ls ${SRCPACKAGE}_${VERSION}.dsc)
LOGFILE=$(echo ${LOGFILE%.dsc}.diffp.log)
- ./misc.git/diffp b1/${SRCPACKAGE}_*.changes b2/${SRCPACKAGE}_*.changes | tee ./results/${LOGFILE}
+ ./misc.git/diffp b1/${SRCPACKAGE}_${VERSION}_amd64.changes b2/${SRCPACKAGE}_${VERSION}_amd64.changes | tee ./results/${LOGFILE}
if ! $(grep -qv '^\*\*\*\*\*' ./results/${LOGFILE}) ; then
mv ./results/${LOGFILE} ./results/_success/
rm -f /var/lib/jenkins/userContent/diffp/${SRCPACKAGE}_*.diffp.log > /dev/null 2>&1
@@ -148,8 +148,8 @@ for SRCPACKAGE in $PACKAGES ; do
mv ${SRCPACKAGE}_${VERSION}.pbuilder.log /var/lib/jenkins/userContent/pbuilder/
fi
- dcmd rm ${SRCPACKAGE}_*.dsc
- sudo rm -f /var/cache/pbuilder/result/${SRCPACKAGE}_*
+ dcmd rm ${SRCPACKAGE}_${VERSION}.dsc
+ sudo rm -fv /var/cache/pbuilder/result/${SRCPACKAGE}_* 2>/dev/null
fi