summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_build_rpm.sh
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-12-11 20:18:12 +0100
committerHolger Levsen <holger@layer-acht.org>2015-12-11 20:18:12 +0100
commit3dd2c02a9fc7e0ad1172d768cffb63163e4d670b (patch)
tree9ab12c17949d7600cc648089651c2f04790cbc96 /bin/reproducible_build_rpm.sh
parent0c9abe46890ade7662eb323ce1cfe3bbd83df180 (diff)
downloadjenkins.debian.net-3dd2c02a9fc7e0ad1172d768cffb63163e4d670b.tar.xz
reproducible fedora rpms: better cleanup
Diffstat (limited to 'bin/reproducible_build_rpm.sh')
-rwxr-xr-xbin/reproducible_build_rpm.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/reproducible_build_rpm.sh b/bin/reproducible_build_rpm.sh
index 6a4369a5..24071dbb 100755
--- a/bin/reproducible_build_rpm.sh
+++ b/bin/reproducible_build_rpm.sh
@@ -81,7 +81,7 @@ first_build() {
local LOG=$TMPDIR/b1/$SRCPACKAGE/build1.log
# nicely run mock with a timeout of 4h
timeout -k 4.1h 4h /usr/bin/ionice -c 3 /usr/bin/nice \
- mock -r $RELEASE-$ARCH --resultdir=$RESULTDIR $SRC_RPM 2>&1 | tee -a $LOG
+ mock -r $RELEASE-$ARCH --resultdir=$RESULTDIR --cleanup-after --rebuild -v $SRC_RPM 2>&1 | tee -a $LOG
PRESULT=${PIPESTATUS[0]}
if [ $PRESULT -eq 124 ] ; then
echo "$(date -u) - mock was killed by timeout after 4h." | tee -a $LOG
@@ -102,7 +102,7 @@ second_build() {
# NEW_NUM_CPU=$(echo $NUM_CPU-1|bc)
# nicely run mock with a timeout of 4h
timeout -k 4.1h 4h /usr/bin/ionice -c 3 /usr/bin/nice \
- mock -r $RELEASE-$ARCH --resultdir=$RESULTDIR $SRC_RPM 2>&1 | tee -a $LOG
+ mock -r $RELEASE-$ARCH --resultdir=$RESULTDIR --cleanup-after --rebuild -v $SRC_RPM 2>&1 | tee -a $LOG
PRESULT=${PIPESTATUS[0]}
if [ $PRESULT -eq 124 ] ; then
echo "$(date -u) - mock was killed by timeout after 4h." | tee -a $LOG
@@ -178,7 +178,7 @@ if [ "$1" = "1" ] || [ "$1" = "2" ] ; then
second_build
fi
# preserve results and delete build directory
- mv -v /tmp/$SRCPACKAGE-$(basename $TMPDIR)/$SRCPACKAGE/*.rpm $TMPDIR/b$MODE/$SRCPACKAGE/ || ls /tmp/$SRCPACKAGE-$(basename $TMPDIR)/$SRCPACKAGE/
+ mv -v /tmp/$SRCPACKAGE-$(basename $TMPDIR)/*.rpm $TMPDIR/b$MODE/$SRCPACKAGE/ || ls /tmp/$SRCPACKAGE-$(basename $TMPDIR)/
rm -r /tmp/$SRCPACKAGE-$(basename $TMPDIR)/
echo "$(date -u) - build #$MODE for $SRCPACKAGE on $HOSTNAME done."
exit 0