[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] 2 commits: reproducible Debian builtin-pho: refactoring

Holger Levsen gitlab at salsa.debian.org
Sat Feb 29 13:52:22 GMT 2020



Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
5b80352b by Holger Levsen at 2020-02-29T13:37:21+01:00
reproducible Debian builtin-pho: refactoring

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -
81993e7a by Holger Levsen at 2020-02-29T13:41:33+01:00
reproducible Debian builtin-pho: include number of existing .buildinfo files

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


1 changed file:

- bin/reproducible_html_builtin-pho.sh


Changes:

=====================================
bin/reproducible_html_builtin-pho.sh
=====================================
@@ -16,18 +16,38 @@ common_init "$@"
 # on which this relies.
 #
 
-query_builtin_pho_db() {
+get_localsuite() {
 	if [ "$SUITE" = "unstable" ] ; then
-		local SUITE="sid"
+		LOCALSUITE="sid"
 	else
-		local SUITE=$SUITE
+		LOCALSUITE=$SUITE
 	fi
+}
+
+query_builtin_pho_db_hits() {
+	get_localsuite
+	psql --tuples-only buildinfo <<EOF > $DUMMY_FILE
+SELECT DISTINCT p.source,p.version
+FROM
+      binary_packages p, builds b
+WHERE
+      p.suite='$LOCALSUITE'
+      AND b.source=p.source
+      AND p.version=b.version
+      AND ( (b.arch_all AND p.arch='all') OR
+            (b.arch_$ARCH AND p.arch='$ARCH') )
+ORDER BY source
+EOF
+}
+
+query_builtin_pho_db_misses() {
+	get_localsuite
 	psql --tuples-only buildinfo <<EOF > $DUMMY_FILE
 SELECT DISTINCT p.source,p.version
 FROM
       binary_packages p
 WHERE
-      p.suite='$SUITE'
+      p.suite='$LOCALSUITE'
 EXCEPT
       SELECT p.source,p.version
 FROM binary_packages p, builds b
@@ -46,17 +66,18 @@ EOF
 create_buildinfo_page() {
 	VIEW=buildinfo
 	PAGE=index_${VIEW}.html
-	echo "$(date -u) - querying builtin-pho database for $SUITE/$ARCH."
-	query_builtin_pho_db
 	echo "$(date -u) - starting to write $PAGE page for $SUITE/$ARCH."
 	write_page_header $VIEW "Overview of missing .buildinfo files for $SUITE/$ARCH"
 	write_page "<p>"
+	query_builtin_pho_db_hits
+	cat $DUMMY_FILE | wc -l >> $PAGE
+	write_page "packages with .buildinfo files found. "
+	query_builtin_pho_db_misses
 	cat $DUMMY_FILE | wc -l >> $PAGE
 	write_page "packages without .buildinfo files in $SUITE/$ARCH:"
 	write_page "<br/><small>ToDo: graph that count</small>"
 	write_page "<br/><small>ToDo: trigger rsync job on success</small>"
 	write_page "<br/><small>ToDo: link these pages from navigation</small>"
-	write_page "<br/><small>ToDo: add information about number of existing .buildinfo files</small>"
 	write_page "<br/><small>ToDo: create page(s) with links to existing .buildinfo files</small>"
 	write_page "</p>"
 	write_page "<pre>"
@@ -75,6 +96,7 @@ create_buildinfo_page() {
 # main
 #
 DUMMY_FILE=$(mktemp -t reproducible-builtin-pho-XXXXXXXX)
+LOCALSUITE=""
 for ARCH in ${ARCHS} ; do
 	for SUITE in $SUITES ; do
 		create_buildinfo_page



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/05c83d2d7224c6d4a52c0097e3e2e31e3710ef9e...81993e7adc9808cf6fe410c36f9509bd623e2fd9

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/05c83d2d7224c6d4a52c0097e3e2e31e3710ef9e...81993e7adc9808cf6fe410c36f9509bd623e2fd9
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20200229/04b999c1/attachment-0001.html>


More information about the Qa-jenkins-scm mailing list