summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_build.sh
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2014-10-19 12:25:21 +0200
committerHolger Levsen <holger@layer-acht.org>2014-10-19 12:25:21 +0200
commitcc3f3adf7b8062005d9212b738c3235aba6c4b7e (patch)
tree79621937fd4c19dfda3a02a63b0c5bc9c068d496 /bin/reproducible_build.sh
parent906bac3ad466fe801bbdd87b537218611b82ba84 (diff)
downloadjenkins.debian.net-cc3f3adf7b8062005d9212b738c3235aba6c4b7e.tar.xz
reproducible: fix race condition when a package page was already updated after a build has started...
Diffstat (limited to 'bin/reproducible_build.sh')
-rwxr-xr-xbin/reproducible_build.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 4a7fc84b..3d3d5f0a 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -25,8 +25,9 @@ cleanup_userContent() {
unschedule_from_db() {
# unmark build as properly finished
sqlite3 -init $INIT ${PACKAGES_DB} "DELETE FROM sources_scheduled WHERE name = '$SRCPACKAGE';"
- # update html page for package
set +x
+ # (force) update html page for package (only really needed for long building packages where a note updates the page during build....)
+ touch -d $PREDATE /var/lib/jenkins/userContent/rb-pkg/${SRCPACKAGE}.html
process_packages $SRCPACKAGE
echo
echo "Successfully updated the database and updated $JENKINS_URL/userContent/rb-pkg/$SRCPACKAGE.html"
@@ -48,6 +49,7 @@ else
echo "Trying to build ${SRCPACKAGE} reproducibly now."
echo "============================================================================="
set -x
+ PREDATE=$(date -d "1 minute ago" +'%Y-%m-%d %H:%M')
DATE=$(date +'%Y-%m-%d %H:%M')
# mark build attempt
sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO sources_scheduled VALUES ('$SRCPACKAGE','$SCHEDULED_DATE','$DATE');"