[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible debian: setup_pbuilder: if stamp file is clearly wrong by being too far in the future (because system time got screwed), just delete it and recreate the tarball

Holger Levsen holger at layer-acht.org
Fri Jan 20 13:29:03 UTC 2017


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 6c1b7ceeb48b8323082c8bbbd2288a73a30b5fbc
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Fri Jan 20 14:15:51 2017 +0100

    reproducible debian: setup_pbuilder: if stamp file is clearly wrong by being too far in the future (because system time got screwed), just delete it and recreate the tarball
---
 bin/reproducible_setup_pbuilder.sh | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/bin/reproducible_setup_pbuilder.sh b/bin/reproducible_setup_pbuilder.sh
index 2783480..23a6cf6 100755
--- a/bin/reproducible_setup_pbuilder.sh
+++ b/bin/reproducible_setup_pbuilder.sh
@@ -162,8 +162,13 @@ STAMP=/var/log/jenkins/$SUITE-reproducible-base.tgz.stamp
 
 if [ -f "$STAMP" ] ; then
 	if [ -f "$STAMP" -a $(stat -c %Y "$STAMP") -gt $(date +%s) ]; then
-		echo "stamp file has a timestamp from the future."
-		exit 1
+		if [ $(stat -c %Y "$STAMP") -gt $(date +%s -d "+ 6 months")] then
+			echo "Warning: stamp file is too far in the future, assuming something is wrong and deleting it"
+			rm -v "$STAMP"
+		else
+			echo "stamp file has a timestamp from the future."
+			exit 1
+		fi
 	fi
 fi
 

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