diff options
Diffstat (limited to 'bin/reproducible_common.sh')
-rwxr-xr-x | bin/reproducible_common.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh index f65dcf03..1aeb3644 100755 --- a/bin/reproducible_common.sh +++ b/bin/reproducible_common.sh @@ -34,6 +34,11 @@ elif [ ! -f ${PACKAGES_DB} ] && [ "$HOSTNAME" = "$MAINNODE" ] ; then EOF fi +# query reproducible database +query_db() { + sqlite3 -init ${INIT} ${PACKAGES_DB} "$@" +} + # common variables REPRODUCIBLE_URL=https://tests.reproducible-builds.org DEBIAN_URL=https://tests.reproducible-builds.org/debian @@ -273,7 +278,7 @@ write_page_header() { write_page " <a href=\"$JENKINS_URL/userContent/about.html#_reproducible_builds_jobs\">jenkins.debian.net</a>." write_page " Thanks to <a href=\"https://www.profitbricks.co.uk\">Profitbricks</a> for donating the virtual machines this is running on!" write_page "</ul>" - LATEST=$(sqlite3 -init $INIT ${PACKAGES_DB} "SELECT s.name FROM results AS r JOIN sources AS s ON r.package_id = s.id WHERE r.status IN ('unreproducible') AND s.suite = 'unstable' AND s.architecture = 'amd64' AND s.id NOT IN (SELECT package_id FROM notes) ORDER BY build_date DESC LIMIT 23"|sort -R|head -1) + LATEST=$(query_db "SELECT s.name FROM results AS r JOIN sources AS s ON r.package_id = s.id WHERE r.status IN ('unreproducible') AND s.suite = 'unstable' AND s.architecture = 'amd64' AND s.id NOT IN (SELECT package_id FROM notes) ORDER BY build_date DESC LIMIT 23"|sort -R|head -1) write_page "<form action=\"$REPRODUCIBLE_URL/redirect\" method=\"GET\">$REPRODUCIBLE_URL/" write_page "<input type=\"text\" name=\"SrcPkg\" placeholder=\"Type my friend..\" value=\"$LATEST\" />" write_page "<input type=\"submit\" value=\"submit source package name\" />" |