[Qa-jenkins-scm] [jenkins.debian.net] 02/02: reproducible: stop if stamp file has timestamp from future

Holger Levsen holger at moszumanska.debian.org
Sun Apr 3 14:28:10 UTC 2016


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 bb4ee336717a94a48029c256ccda0cb893307abb
Author: Reiner Herrmann <reiner at reiner-h.de>
Date:   Sun Apr 3 16:24:46 2016 +0200

    reproducible: stop if stamp file has timestamp from future
---
 bin/reproducible_setup_pbuilder.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/bin/reproducible_setup_pbuilder.sh b/bin/reproducible_setup_pbuilder.sh
index 5065d03..57ef3e8 100755
--- a/bin/reproducible_setup_pbuilder.sh
+++ b/bin/reproducible_setup_pbuilder.sh
@@ -125,6 +125,12 @@ setup_pbuilder() {
 #
 BASETGZ=/var/cache/pbuilder/$SUITE-reproducible-base.tgz
 STAMP=/var/log/jenkins/$SUITE-reproducible-base.tgz.stamp
+
+if [ -f "$STAMP" -a $(stat -c %Y "$STAMP") -gt $(date +%s) ]; then
+	echo "stamp file has a timestamp from the future."
+	exit 1
+fi
+
 OLDSTAMP=$(find $STAMP -mtime +1 -exec ls -lad {} \; || echo "nostamp")
 if [ -n "$OLDSTAMP" ] || [ ! -f $BASETGZ ] || [ ! -f $STAMP ] ; then
 	if [ ! -f $BASETGZ ] ; then

-- 
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