summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/reproducible_stats.sh20
1 files changed, 12 insertions, 8 deletions
diff --git a/bin/reproducible_stats.sh b/bin/reproducible_stats.sh
index 0050bb73..fc2fc366 100755
--- a/bin/reproducible_stats.sh
+++ b/bin/reproducible_stats.sh
@@ -24,9 +24,10 @@ COUNT_UGLY=$(sqlite3 $PACKAGES_DB "SELECT COUNT(name) FROM source_packages WHERE
SOURCELESS=$(sqlite3 $PACKAGES_DB "SELECT name FROM source_packages WHERE status = \"404\" ORDER BY build_date DESC" | xargs echo)
COUNT_SOURCELESS=$(sqlite3 $PACKAGES_DB "SELECT COUNT(name) FROM source_packages WHERE status = \"404\"" | xargs echo)
COUNT_TOTAL=$(sqlite3 $PACKAGES_DB "SELECT COUNT(name) FROM source_packages")
-PERCENT_TOTAL=$(echo "scale=3 ; ($COUNT_TOTAL*100/$AMOUNT)" | bc)
-PERCENT_GOOD=$(echo "scale=3 ; ($COUNT_GOOD*100/$COUNT_TOTAL)" | bc)
-PERCENT_BAD=$(echo "scale=3 ; ($COUNT_BAD*100/$COUNT_TOTAL)" | bc)
+PERCENT_TOTAL=$(echo "scale=1 ; ($COUNT_TOTAL*100/$AMOUNT)" | bc)
+PERCENT_GOOD=$(echo "scale=1 ; ($COUNT_GOOD*100/$COUNT_TOTAL)" | bc)
+PERCENT_BAD=$(echo "scale=1 ; ($COUNT_BAD*100/$COUNT_TOTAL)" | bc)
+GUESS_GOOD=$(echo "$PERCENT_GOOD*$AMOUNT/100" | bc)
htmlecho() {
echo "$1" >> index.html
@@ -34,9 +35,9 @@ htmlecho() {
rm index.html
htmlecho "<html><body>" > index.html
-htmlecho "<h2>Simple statistics for reproducible builds</h2>"
-htmlecho "<p>Results were obtaining by <a href=\"$JENKINS_URL/view/reproducible\">several jobs running on jenkins.debian.net</a>.</p>"
-htmlecho "<p>$COUNT_TOTAL packages attempted to build so far, out of $AMOUNT in $SUITE currently. That's $PERCENT_TOTAL%!</p>"
+htmlecho "<h2>Statistics for reproducible builds</h2>"
+htmlecho "<p>Results were obtaining by <a href=\"$JENKINS_URL/view/reproducible\">several jobs running on jenkins.debian.net</a>. This page is updated after each job run.</p>"
+htmlecho "<p>$COUNT_TOTAL packages attempted to build so far, out of $AMOUNT in Debian $SUITE currently. That's $PERCENT_TOTAL%!</p>"
htmlecho "<p>$COUNT_BAD packages ($PERCENT_BAD% of $COUNT_TOTAL) failed to built reproducibly: <code>"
for PKG in $BAD ; do
VERSION=$(sqlite3 $PACKAGES_DB "SELECT version FROM source_packages WHERE name = \"$PKG\"")
@@ -47,9 +48,12 @@ done
htmlecho "</code></p>"
htmlecho
htmlecho "<p>$COUNT_UGLY packages failed to build from source: <code>${UGLY}</code></p>"
-htmlecho "<p>$COUNT_SOURCELESS packages which don't exist in sid and need investigation: <code>$SOURCELESS</code></p>"
+if [ $COUNT_SOURCELESS -gt 0 ] ; then
+ htmlecho "<p>$COUNT_SOURCELESS packages which don't exist in sid and need investigation: <code>$SOURCELESS</code></p>"
+fi
htmlecho "<p>$COUNT_GOOD packages ($PERCENT_GOOD% of $COUNT_TOTAL) successfully built reproducibly: <code>${GOOD}</code></p>"
-htmlecho "<hr><p>Packages which fail to build reproducibly, sorted by Maintainers: and Uploaders: fields."
+htmlecho "<p>\"$PERCENT_GOOD% of $AMOUNT\" and \"$PERCENT_TOTAL% of $AMOUNT\" means roughly+wildly guessed $GUESS_GOOD packages can be build reproducibly! Yay! :-)"
+htmlecho "<hr><p>Packages which failed to build reproducibly, sorted by Maintainers: and Uploaders: fields."
htmlecho "<pre>$(echo $BAD | dd-list -i) </pre></p>"
htmlecho "<hr><p><font size='-1'><a href=\"$JENKINS_URL/userContent/diffp.html\">Static URL for this page.</a> Last modified: $(date)</font>"
htmlecho "</p></body></html>"