[Qa-jenkins-scm] [jenkins.debian.net] 05/05: reproducible openwrt: add very simple safeguards against cleanup going wrong

Holger Levsen holger at moszumanska.debian.org
Thu Oct 22 00:52:48 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit b0eed42c569582facfb3078dfa04669155fef84a
Author: Holger Levsen <holger at layer-acht.org>
Date:   Wed Oct 21 19:52:32 2015 -0500

    reproducible openwrt: add very simple safeguards against cleanup going wrong
---
 bin/reproducible_openwrt.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/bin/reproducible_openwrt.sh b/bin/reproducible_openwrt.sh
index ee800f0..469c177 100755
--- a/bin/reproducible_openwrt.sh
+++ b/bin/reproducible_openwrt.sh
@@ -15,6 +15,12 @@ set -e
 
 cleanup_tmpdirs() {
 	cd
+	# (very simple) check we are deleting the right stuff
+	if [ "${TMPDIR:0:26}" != "/srv/reproducible-results/" ] || [ ${#TMPDIR} -le 26 ] || \
+	   [ "${TMPBUILDDIR:0:23}" != "/srv/workspace/chroots/" ] || [ ${#TMPBUILDDIR} -le 23 ] ; then
+		echo "Something very strange with \$TMPDIR=$TMPDIR or \$TMPBUILDDIR=$TMPBUILDDIR, exiting instead of doing cleanup."
+		exit 1
+	fi
 	rm -rf $TMPDIR
 	rm -rf $TMPBUILDDIR
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list