From d546a36c6a784d8c58a6e2813667b7d3a843e5b0 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Fri, 16 Oct 2015 18:27:41 +0200 Subject: reproducible arch: never cleanup $TMPDIR from the node, we need to rsync from it --- bin/reproducible_build_arch_pkg.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'bin/reproducible_build_arch_pkg.sh') diff --git a/bin/reproducible_build_arch_pkg.sh b/bin/reproducible_build_arch_pkg.sh index 99aafb62..beff2d66 100755 --- a/bin/reproducible_build_arch_pkg.sh +++ b/bin/reproducible_build_arch_pkg.sh @@ -14,9 +14,11 @@ set -e cleanup_all() { cd - # delete main work dir - rm $TMPDIR -r - echo "$(date -u) - $TMPDIR deleted." + # delete main work dir (only on master) + if [ "$MODE" = "master" ] ; then + rm $TMPDIR -r + echo "$(date -u) - $TMPDIR deleted." + fi # delete makekpg build dir if [ ! -z $SRCPACKAGE ] && [ -d /tmp/$SRCPACKAGE-$(basename $TMPDIR) ] ; then rm -r /tmp/$SRCPACKAGE-$(basename $TMPDIR) @@ -87,6 +89,7 @@ remote_build() { ssh -p $PORT $NODE /srv/jenkins/bin/reproducible_build_arch_pkg.sh $BUILDNR ${SRCPACKAGE} ${TMPDIR} RESULT=$? if [ $RESULT -ne 0 ] ; then + ssh -p $PORT $NODE "rm -r $TMPDIR" || true handle_remote_error "with exit code $RESULT from $NODE for build #$BUILDNR for ${SRCPACKAGE}" fi rsync -e "ssh -p $PORT" -r $NODE:$TMPDIR/b$BUILDNR $TMPDIR/ -- cgit v1.2.3-54-g00ecf