summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_common.sh
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-02-24 14:05:35 +0100
committerHolger Levsen <holger@layer-acht.org>2015-02-26 17:13:54 +0100
commit0c0314351451733f81961a62d067c2f24a2ce802 (patch)
tree6156e0b2c9f1ae7baa04c6ddad415b528648d9f0 /bin/reproducible_common.sh
parente79829da5af895297e8e6653828fd94d93a03b5a (diff)
downloadjenkins.debian.net-0c0314351451733f81961a62d067c2f24a2ce802.tar.xz
reproducible: html_stats, common/gather_stats: update to the new database schema supporting multiple suites. but here we care only about sid, so just hardcode the name
Diffstat (limited to 'bin/reproducible_common.sh')
-rwxr-xr-xbin/reproducible_common.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh
index 37e4ca6a..0ab2bcdd 100755
--- a/bin/reproducible_common.sh
+++ b/bin/reproducible_common.sh
@@ -2,7 +2,6 @@
# Copyright 2014-2015 Holger Levsen <holger@layer-acht.org>
# released under the GPLv=2
-
#
# included by all reproducible_*.sh scripts
#
@@ -249,12 +248,13 @@ gather_schedule_stats() {
COUNT_NEW_VERSIONS=$(sqlite3 -init $INIT $PACKAGES_DB "$QUERY")
}
+# we only care about sid here
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\"")
+ COUNT_BAD=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT COUNT(s.name) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite='sid' AND r.status = \"unreproducible\"")
+ COUNT_UGLY=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT COUNT(s.name) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite='sid' AND r.status = \"FTBFS\"")
+ COUNT_SOURCELESS=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT COUNT(s.name) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite='sid' AND r.status = \"404\"")
+ COUNT_NOTFORUS=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT COUNT(s.name) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite='sid' AND r.status = \"not for us\"")
+ COUNT_BLACKLISTED=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT COUNT(s.name) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite='sid' AND r.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)