summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_setup_pbuilder.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/reproducible_setup_pbuilder.sh')
-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