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

Andreas Tille tille at debian.org
Fri Jul 19 20:56:13 UTC 2013


The following commit has been merged in the master branch:
commit 5889fa2ccce65d8402adb47f9f507d89e2639ef7
Author: Andreas Tille <tille at debian.org>
Date:   Fri Jul 19 12:06:21 2013 +0200

    In case metapackage bugs should be included here is some testcase.  The problem here is that if we do source based bugs also for metapackages all tasks will be affected by a bug in a single metapackage which is obviously the wrong approach.

diff --git a/misc/sql/bugs.sh b/misc/sql/bugs_including_metapackage_bugs.sh
similarity index 66%
copy from misc/sql/bugs.sh
copy to misc/sql/bugs_including_metapackage_bugs.sh
index 1da0817..9cdf06d 100755
--- a/misc/sql/bugs.sh
+++ b/misc/sql/bugs_including_metapackage_bugs.sh
@@ -16,23 +16,25 @@ SELECT distinct sources.source, tasks.tasks, CASE WHEN dependency = 'd' AND comp
     JOIN bugs bu    ON bu.source = p.source
     JOIN sources s  ON s.source  = p.source
     WHERE (blend = '$1' AND b.distribution = 'debian')
-       OR bu.source IN (SELECT metapackage_name FROM blends_tasks WHERE blend = '$1' AND metapackage)
+       OR s.source IN (SELECT DISTINCT p.source FROM blends_tasks bt
+                       JOIN packages p ON p.package = bt.metapackage_name
+                       WHERE blend = 'debian-med' and metapackage)
   GROUP BY s.source, b.dependency, b.component, s.homepage, s.vcs_browser, s.maintainer, s.version
   ) sources
   LEFT OUTER JOIN (
-   SELECT * FROM (
-    SELECT source, array_agg(task) AS tasks FROM (
+    SELECT source, array_agg(task ORDER BY task) AS tasks FROM (
      SELECT DISTINCT p.source, b.task
       FROM packages p
       JOIN releases r ON p.release = r.release
       JOIN blends_dependencies b ON b.package = p.package
       JOIN sources s ON p.source = s.source AND p.release = s.release
       WHERE b.blend = '$1'
-    ) tmp1
+     UNION
+     SELECT DISTINCT p.source, bt.task FROM blends_tasks bt
+      JOIN packages p ON p.package = bt.metapackage_name
+      WHERE blend = '$1' and metapackage
+    ) tmp
     GROUP BY source
-   ) tmp2
-    UNION
-    SELECT metapackage_name AS source, ARRAY[task] AS tasks FROM blends_tasks WHERE blend = '$1' AND metapackage
   ) tasks ON sources.source = tasks.source
   WHERE row_number = 1
   ORDER BY source;
@@ -44,11 +46,13 @@ SELECT source, bu.id, title, status, done_by, tags FROM (
     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')
-       OR bu.source IN (SELECT metapackage_name FROM blends_tasks WHERE blend = '$1' AND metapackage)
+    WHERE (blend = '$1' AND b.distribution = 'debian') OR  -- ... inside the metapackage source itself
+       bu.source IN (SELECT DISTINCT p.source FROM blends_tasks bt
+                       JOIN packages p ON p.package = bt.metapackage_name
+                       WHERE blend = 'debian-med' and metapackage)
   ) bu
   LEFT OUTER JOIN (
-    SELECT id, array_agg(tag) AS tags FROM bugs_tags GROUP BY id
+    SELECT id, array_agg(tag ORDER BY tag) AS tags FROM bugs_tags GROUP BY id
   ) bt ON bu.id = bt.id
   ORDER BY source, bu.id;
 EOT
diff --git a/misc/sql/inject_fake_bug_for_testing_metapackages.sh b/misc/sql/inject_fake_bug_for_testing_metapackages.sh
new file mode 100755
index 0000000..483ac70
--- /dev/null
+++ b/misc/sql/inject_fake_bug_for_testing_metapackages.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+SERVICE="service=udd"
+#if there is a local UDD clone just use this
+if psql -l 2>/dev/null | grep -qw udd ; then
+    SERVICE=udd
+fi
+
+psql $SERVICE >$1.out <<EOT
+  INSERT INTO bugs (id, package, source, arrival, status, severity, submitter, title)
+         VALUES(1, 'med-tools', 'debian-med', '2013-07-18 00:00:00', 'pending', 'important', 'Andreas Tille <tille at debian.org>', 'This is only a test for Blends tools - no real bug') ;
+EOT

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list