From 56b3fa7e2c76926312b032bc4515bcbcbb5951da Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Fri, 17 Oct 2014 19:58:31 +0200 Subject: reproducible: refactor, create the package html file directly after build --- bin/reproducible_build.sh | 5 +++++ bin/reproducible_common.sh | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index d7fe7952..c7084e48 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -25,6 +25,11 @@ 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 + process_packages $SRCPACKAGE + echo "Successfully updated the database and updated the html file for the package." + echo "Enjoy $JENKINS_URL/userContent/rb-pkg/$SRCPACKAGE.html" } TMPDIR=$(mktemp --tmpdir=$PWD -d) diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh index ebd58048..346b8ce4 100755 --- a/bin/reproducible_common.sh +++ b/bin/reproducible_common.sh @@ -103,6 +103,11 @@ JENKINS_URL=${JENKINS_URL:0:-1} # we only need them for html creation but we cannot declare them in a function declare -A SPOKENTARGET declare -A LINKTARGET +NOTES_PATH=/var/lib/jenkins/userContent/notes +ISSUES_PATH=/var/lib/jenkins/userContent/issues +mkdir -p $NOTES_PATH $ISSUES_PATH +# FIXME RB_PATH would also be a good idea +mkdir -p /var/lib/jenkins/userContent/rb-pkg/ init_html() { SUITE=sid @@ -123,11 +128,6 @@ init_html() { SPOKENTARGET["404"]="packages where the sources failed to downloaded" SPOKENTARGET["not_for_us"]="packages which should not be build on 'amd64'" SPOKENTARGET["blacklisted"]="packages which have been blacklisted" - NOTES_PATH=/var/lib/jenkins/userContent/notes - ISSUES_PATH=/var/lib/jenkins/userContent/issues - mkdir -p $NOTES_PATH $ISSUES_PATH - # FIXME RB_PATH would also be a good idea - mkdir -p /var/lib/jenkins/userContent/rb-pkg/ # query some data we need everywhere AMOUNT=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT count(name) FROM sources") COUNT_TOTAL=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT COUNT(name) FROM source_packages") -- cgit v1.2.3-54-g00ecf