[Blends-commit] [SCM] website branch, master, updated. 51a0f0f7451f57905a2b8d3b96ce6092e81ac540

Andreas Tille tille at debian.org
Wed May 18 12:00:16 UTC 2016


The following commit has been merged in the master branch:
commit 51a0f0f7451f57905a2b8d3b96ce6092e81ac540
Author: Andreas Tille <tille at debian.org>
Date:   Wed May 18 13:58:15 2016 +0200

    Give a list of source packages ordered by votes of binary package with maximum vote and the availability of a test suite

diff --git a/misc/sql/0-missing-autopkgtest.sh b/misc/sql/0-missing-autopkgtest.sh
index 63bc62b..c1f09fb 100755
--- a/misc/sql/0-missing-autopkgtest.sh
+++ b/misc/sql/0-missing-autopkgtest.sh
@@ -1,5 +1,8 @@
 #!/bin/sh
 # seek for packages without autopkgtest ordered by popcon
+#
+# This query gives a list of source packages ordered by votes of binary
+# package with maximum vote and the availability of a test suite
 
 if [ $# -ne 2 ] ; then
     echo "Usage: $0 <blend> <task>"
@@ -21,27 +24,19 @@ if ! psql $PORT $SERVICE -c "" 2>/dev/null ; then
 fi
 
 psql $SERVICE <<EOT
-    SELECT DISTINCT p.source, p.package, pop.vote, s.testsuite FROM packages p
+SELECT source, vote, testsuite FROM (
+  SELECT source, vote, testsuite, row_number() OVER (PARTITION BY source ORDER BY vote DESC) FROM (
+    SELECT DISTINCT p.source, p.package, CASE WHEN pop.vote IS NULL THEN -1 ELSE pop.vote END AS vote, s.testsuite FROM packages p
       LEFT OUTER JOIN popcon  pop ON p.package = pop.package
       LEFT OUTER JOIN (SELECT source, testsuite FROM sources WHERE release = 'sid' ) s   ON p.source  = s.source
       WHERE p.package IN (
         SELECT package FROM blends_dependencies WHERE blend = '$1' AND task = '$2'
       )
       AND p.release = 'sid'
-  ORDER BY source
+  ) tmp1
+) tmp2
+ORDER BY vote DESC, source
   ;
 EOT
 
-
 exit 0
-
-psql $SERVICE <<EOT
-SELECT DISTINCT source, release, testsuite FROM sources
-  WHERE source IN (
-    SELECT DISTINCT source FROM packages WHERE package IN (
-        SELECT package FROM blends_dependencies WHERE blend = '$1' AND task = '$2'
-      )
-    ) AND release = 'sid'
-  ORDER BY source
-  ;
-EOT

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list