diff options
author | Holger Levsen <holger@layer-acht.org> | 2014-10-17 20:46:14 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2014-10-17 20:46:14 +0200 |
commit | 98f55ed3b3c5d25870cca37e4f4e8325a58514f3 (patch) | |
tree | 9dc44509f4424c87392e23509a215e4a3c04d953 /bin/reproducible_common.sh | |
parent | 61fe5629153551e3b38ebc2df56a2a39b2201098 (diff) | |
download | jenkins.debian.net-98f55ed3b3c5d25870cca37e4f4e8325a58514f3.tar.xz |
reproducible: refactor, split stats script+job in html_indexes and html_graphs.
Diffstat (limited to 'bin/reproducible_common.sh')
-rwxr-xr-x | bin/reproducible_common.sh | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh index 346b8ce4..4808e57d 100755 --- a/bin/reproducible_common.sh +++ b/bin/reproducible_common.sh @@ -261,15 +261,12 @@ force_package_targets() { } link_packages() { + STAR="" for PKG in $@ ; do - STAR="" - write_page " ${LINKTARGET[$PKG]}" if $BUILDINFO_SIGNS ; then set_package_star - if [ ! -z "$STAR" ] ; then - write_page "$STAR " - fi fi + write_page " ${LINKTARGET[$PKG]} $STAR" done } @@ -351,4 +348,14 @@ process_packages() { done } - +gather_stats() { + COUNT_BAD=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT COUNT(name) FROM source_packages WHERE status = \"unreproducible\"") + COUNT_UGLY=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT COUNT(name) FROM source_packages WHERE status = \"FTBFS\"") + COUNT_SOURCELESS=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT COUNT(name) FROM source_packages WHERE status = \"404\"") + COUNT_NOTFORUS=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT COUNT(name) FROM source_packages WHERE status = \"not for us\"") + COUNT_BLACKLISTED=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT COUNT(name) FROM source_packages WHERE status = \"blacklisted\"") + PERCENT_BAD=$(echo "scale=1 ; ($COUNT_BAD*100/$COUNT_TOTAL)" | bc) + PERCENT_UGLY=$(echo "scale=1 ; ($COUNT_UGLY*100/$COUNT_TOTAL)" | bc) + PERCENT_NOTFORUS=$(echo "scale=1 ; ($COUNT_NOTFORUS*100/$COUNT_TOTAL)" | bc) + PERCENT_SOURCELESS=$(echo "scale=1 ; ($COUNT_SOURCELESS*100/$COUNT_TOTAL)" | bc) +} |