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

Andreas Tille tille at debian.org
Wed Jul 17 10:17:12 UTC 2013


The following commit has been merged in the master branch:
commit 4e527b36589a0a965cfb3e8662b3fe33d6899c9d
Author: Andreas Tille <tille at debian.org>
Date:   Wed Jul 17 12:20:13 2013 +0200

    Testing some queries to replace current bugs pages by UDD queries only

diff --git a/misc/sql/bugs.sh b/misc/sql/bugs.sh
new file mode 100755
index 0000000..911fcee
--- /dev/null
+++ b/misc/sql/bugs.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+# query fo rbugs
+# Used to rewrite bugs pages for web sentinel based on UDD query only
+
+if [ $# -lt 1 ] ; then
+    echo "Usage: $0 <blendname>"
+    exit
+fi
+
+psql udd > $1_buggy_packages.out <<EOT
+SELECT distinct source, task, CASE WHEN dependency = 'd' AND component = 'main' THEN 'depends' ELSE 'suggests' END AS status, version, homepage, vcs_browser, maintainer
+  FROM (
+  SELECT s.source, b.task, b.dependency, 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.task, b.dependency, b.component, s.homepage, s.vcs_browser, s.maintainer, s.version
+  ) tmp
+  WHERE row_number = 1
+  ORDER BY source;
+EOT
+
+psql udd > $1_bugs_packages.out <<EOT
+SELECT distinct bu.source, bu.id, bu.title, bu.status, bu.done
+  FROM blends_dependencies b
+  JOIN packages p ON p.package = b.package
+  JOIN bugs bu    ON bu.source = p.source
+  WHERE blend = '$1' AND b.distribution = 'debian'
+  ORDER BY source;
+EOT
+

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list