summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReiner Herrmann <reiner@reiner-h.de>2016-04-03 16:24:46 +0200
committerHolger Levsen <holger@layer-acht.org>2016-04-03 16:28:02 +0200
commitbb4ee336717a94a48029c256ccda0cb893307abb (patch)
tree6b37bf33854d4252d3a2af6721a85fe54389708e
parent6abc1c049b2153f35a117ae77f4964bf8c2f2e76 (diff)
downloadjenkins.debian.net-bb4ee336717a94a48029c256ccda0cb893307abb.tar.xz
reproducible: stop if stamp file has timestamp from future
-rwxr-xr-xbin/reproducible_setup_pbuilder.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/reproducible_setup_pbuilder.sh b/bin/reproducible_setup_pbuilder.sh
index 5065d03f..57ef3e87 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