summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2014-10-05 18:20:30 +0200
committerHolger Levsen <holger@layer-acht.org>2014-10-05 18:20:30 +0200
commit50d1b5e106f60aeca27cab58095c015546e6b56e (patch)
tree8a09d3991861f0f9f16e307ed7eee291ad4eb2d5
parentfb4ef297434dcb1df2d569aedb922e8f7d1dea54 (diff)
downloadjenkins.debian.net-50d1b5e106f60aeca27cab58095c015546e6b56e.tar.xz
reproducible: refactor
-rwxr-xr-xbin/reproducible_build.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 06c95a73..5bc7f647 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -95,6 +95,11 @@ cleanup_userContent() {
rm -f /var/lib/jenkins/userContent/pbuilder/${SRCPACKAGE}_*.pbuilder.log 2>/dev/null
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
+}
+
+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
}
@@ -117,7 +122,7 @@ for SRCPACKAGE in ${PACKAGES} ; do
echo "============================================================================="
set -x
let "COUNT_TOTAL=COUNT_TOTAL+1"
- rm b1 b2 -rf
+ cleanup_prebuild
set +e
DATE=$(date +'%Y-%m-%d %H:%M')
VERSION=$(apt-cache showsrc ${SRCPACKAGE} | grep ^Version | cut -d " " -f2 | sort -r | head -1)
@@ -130,7 +135,6 @@ for SRCPACKAGE in ${PACKAGES} ; do
SKIPPED="${SRCPACKAGE} ${SKIPPED}"
continue
fi
- rm -f ${SRCPACKAGE}_* > /dev/null 2>&1
RBUILDLOG=/var/lib/jenkins/userContent/rbuild/${SRCPACKAGE}_None.rbuild.log
# host has only sid in deb-src in sources.list
apt-get source --download-only --only-source ${SRCPACKAGE} > ${RBUILDLOG} 2>&1