[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible Debian builtin-pho: fix off by one error

Holger Levsen gitlab at salsa.debian.org
Sat Feb 29 17:35:21 GMT 2020



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


Commits:
3f151ee9 by Holger Levsen at 2020-02-29T18:34:57+01:00
reproducible Debian builtin-pho: fix off by one error

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
=====================================
@@ -19,7 +19,6 @@ common_init "$@"
 # ToDo:
 # - create graphs
 # - import the data from the database on pb7 into the one on jenkins
-# - fix off by one error
 # - include data for stretch and experimental
 
 get_localsuite() {
@@ -30,7 +29,10 @@ get_localsuite() {
 	fi
 }
 
-sed_db_output_to_html() {
+convert_db_output_to_html() {
+	# remove empty lines
+	sed -i '/^$/d' $1
+	# use sed to turn psql output into html
 	cat $1 | tr -d ' '  | sed -E "s/([^|]*)(.*)/<a href=\"https:\/\/tracker.debian.org\/\1\">\1<\/a> <a href=\"https:\/\/packages.debian.org\/$SUITE\/\1\">binaries (\2)<\/a> <a href=\"https:\/\/buildinfos.debian.net\/\1\">.buildinfo<\/a>/g" | tr -d '|' > $2
 
 }
@@ -48,7 +50,7 @@ WHERE
             (b.arch_$ARCH AND p.arch='$ARCH') )
 ORDER BY source
 EOF
-	sed_db_output_to_html $RAW_HITS $HTML_HITS
+	convert_db_output_to_html $RAW_HITS $HTML_HITS
 	HITS=$(cat $RAW_HITS | wc -l)
 }
 
@@ -69,7 +71,7 @@ WHERE
             (b.arch_$ARCH AND p.arch='$ARCH') )
 ORDER BY source
 EOF
-	sed_db_output_to_html $RAW_MISSES $HTML_MISSES
+	convert_db_output_to_html $RAW_MISSES $HTML_MISSES
 	MISSES=$(cat $RAW_MISSES | wc -l)
 }
 



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/3f151ee9ea846b6abf3b8e476498e8fc30ffb5fb

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/3f151ee9ea846b6abf3b8e476498e8fc30ffb5fb
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/2fd84f85/attachment-0001.html>


More information about the Qa-jenkins-scm mailing list