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

Andreas Tille tille at debian.org
Wed Sep 11 18:50:30 UTC 2013


The following commit has been merged in the master branch:
commit d9cdd1e46f957d45c16e8c16a53fca1e398fcebe
Author: Andreas Tille <tille at debian.org>
Date:   Wed Sep 11 20:48:57 2013 +0200

    Sometimes the source package of a binary might change its name.  Make sure we really observe only the source package that belongs to the latest binary package version.  As a side effect a duplicated entry is prevented by this change.

diff --git a/misc/sql/bugs.sh b/misc/sql/bugs.sh
index 669acee..c523fed 100755
--- a/misc/sql/bugs.sh
+++ b/misc/sql/bugs.sh
@@ -11,13 +11,20 @@ psql udd > $1_buggy_packages.out <<EOT
       SELECT distinct sources.source, task, CASE WHEN (tasks.dependency = 'd' OR tasks.dependency = 'r') AND component = 'main' AND experimental_flag > 0 THEN 'depends' ELSE 'suggests' END AS status,
                       homepage, CASE WHEN vcs_browser IS NULL THEN '#' ELSE vcs_browser END AS vcs_browser, maintainer
         FROM (
-          SELECT s.source, b.component, s.homepage, s.vcs_browser, s.maintainer, s.version, row_number() OVER (PARTITION BY s.source ORDER BY s.version DESC)
-            FROM blends_dependencies b
-            JOIN packages p ON p.package = b.package
-            JOIN bugs bu    ON bu.source = p.source
-            JOIN sources s  ON s.source  = p.source
-            WHERE blend = '$1' AND b.distribution = 'debian'
-            GROUP BY s.source, b.dependency, b.component, s.homepage, s.vcs_browser, s.maintainer, s.version
+          SELECT DISTINCT s.source, b.dependency, b.component, s.homepage, s.vcs_browser, s.maintainer, s.version
+          FROM (
+            SELECT DISTINCT source, dependency, component, version FROM (
+              SELECT p.package, source, bd.dependency, bd.component, strip_binary_upload(version) AS version,
+                     row_number() OVER (PARTITION BY p.package ORDER BY p.version DESC)
+                FROM blends_dependencies bd
+                JOIN packages p ON p.package = bd.package
+                WHERE blend = '$1' AND bd.distribution = 'debian'
+                GROUP BY p.package, p.source, bd.dependency, bd.component, p.version
+              ) tmp
+              WHERE row_number = 1
+            ) b
+            JOIN sources s  ON s.source  = b.source AND strip_binary_upload(s.version) = b.version
+            JOIN bugs bu    ON bu.source = b.source
         ) sources
         -- check status of dependency relation because only suggested packages are less important for bugs sentinel
         LEFT OUTER JOIN (
@@ -38,7 +45,6 @@ psql udd > $1_buggy_packages.out <<EOT
             JOIN releases r ON s.release = r.release
           GROUP BY source
         ) exp ON sources.source = exp.source
-        WHERE row_number = 1
         ORDER BY source;
 EOT
 

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list