diff options
author | Holger Levsen <holger@layer-acht.org> | 2016-04-03 16:26:44 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2016-04-03 16:26:44 +0200 |
commit | 8e4e3d74f2133dd8cf48d88879a20205566a0f72 (patch) | |
tree | cce632bea83e7b6a1e17524473a254a2efd0e2bc /bin | |
parent | c0fb535593456b9b383b8943e0afb0216f2f101a (diff) | |
download | jenkins.debian.net-8e4e3d74f2133dd8cf48d88879a20205566a0f72.tar.xz |
reproducible debian: fail the job if stamp file is from the future
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_setup_pbuilder.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/reproducible_setup_pbuilder.sh b/bin/reproducible_setup_pbuilder.sh index 5065d03f..55f2f3d9 100755 --- a/bin/reproducible_setup_pbuilder.sh +++ b/bin/reproducible_setup_pbuilder.sh @@ -126,6 +126,13 @@ setup_pbuilder() { BASETGZ=/var/cache/pbuilder/$SUITE-reproducible-base.tgz STAMP=/var/log/jenkins/$SUITE-reproducible-base.tgz.stamp OLDSTAMP=$(find $STAMP -mtime +1 -exec ls -lad {} \; || echo "nostamp") +NOW=$(mktemp) +if [ $STAMP -nt $NOW ] ; then + echo "$STAMP file was created in the future, please investigate..." + rm $NOW > /dev/null + exit 1 +fi +rm $NOW > /dev/null if [ -n "$OLDSTAMP" ] || [ ! -f $BASETGZ ] || [ ! -f $STAMP ] ; then if [ ! -f $BASETGZ ] ; then echo "No $BASETGZ exists, creating a new one..." |