diff options
-rwxr-xr-x | bin/reproducible_build.sh | 24 |
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 |