[Collab-qa-commits] r1065 - udd/web/cgi-bin

lucas at alioth.debian.org lucas at alioth.debian.org
Mon Aug 11 03:08:15 UTC 2008


Author: lucas
Date: 2008-08-11 03:08:14 +0000 (Mon, 11 Aug 2008)
New Revision: 1065

Modified:
   udd/web/cgi-bin/packages_in_unstable_but_not_in_testing_by_popcon.cgi
   udd/web/cgi-bin/removal_candidates.cgi
Log:
use summary tables

Modified: udd/web/cgi-bin/packages_in_unstable_but_not_in_testing_by_popcon.cgi
===================================================================
--- udd/web/cgi-bin/packages_in_unstable_but_not_in_testing_by_popcon.cgi	2008-08-11 03:07:53 UTC (rev 1064)
+++ udd/web/cgi-bin/packages_in_unstable_but_not_in_testing_by_popcon.cgi	2008-08-11 03:08:14 UTC (rev 1065)
@@ -8,14 +8,11 @@
 
 my $dbh = DBI->connect("dbi:Pg:dbname=udd") or die $!;
 my $sth = $dbh->prepare(<<EOF
-	SELECT DISTINCT unstable.package, insts
-        FROM (SELECT DISTINCT package FROM packages
-                WHERE release = 'sid')
-          AS unstable,
-             popcon
-        WHERE NOT EXISTS (SELECT 1 FROM packages WHERE
-                          release = 'lenny' and package = unstable.package)
-              AND popcon.package = unstable.package ORDER BY insts DESC;
+SELECT DISTINCT pkgs.package, insts
+FROM packages_summary pkgs, popcon
+WHERE pkgs.release = 'sid' AND pkgs.package NOT IN
+(SELECT package FROM packages_summary WHERE release = 'lenny')
+AND popcon.package = pkgs.package ORDER BY insts DESC;
 EOF
 	);
 

Modified: udd/web/cgi-bin/removal_candidates.cgi
===================================================================
--- udd/web/cgi-bin/removal_candidates.cgi	2008-08-11 03:07:53 UTC (rev 1064)
+++ udd/web/cgi-bin/removal_candidates.cgi	2008-08-11 03:08:14 UTC (rev 1065)
@@ -8,16 +8,16 @@
 
 my $s = <<EOF
 select sources.source, id, insts, arrival, last_modified, title
-from sources, bugs_unarchived AS bugs, popcon_src
+from sources, bugs AS bugs, popcon_src
 where sources.distribution = 'debian' and sources.release = 'lenny'
 and bugs.source = sources.source
-and bugs.affects_testing = true
-and bugs.affects_unstable = true
+and id in (select id from bugs_rt_affects_testing)
+and id in (select id from bugs_rt_affects_unstable)
 and bugs.severity in ('serious', 'grave', 'critical')
 and arrival < (NOW() - interval '14 DAYS')
 and sources.source = popcon_src.source
 and popcon_src.insts < 2000
-order by source;
+order by insts ASC
 EOF
 ;
 




More information about the Collab-qa-commits mailing list