Author: lucas
Date: 2008-07-28 14:06:53 +0000 (Mon, 28 Jul 2008)
New Revision: 953

Added:
   udd/web/cgi-bin/sources_in_ubuntu_but_not_in_debian_by_popcon.cgi
Log:
added cgi: sources_in_ubuntu_but_not_in_debian_by_popcon

Added: udd/web/cgi-bin/sources_in_ubuntu_but_not_in_debian_by_popcon.cgi
===================================================================
--- udd/web/cgi-bin/sources_in_ubuntu_but_not_in_debian_by_popcon.cgi           
                (rev 0)
+++ udd/web/cgi-bin/sources_in_ubuntu_but_not_in_debian_by_popcon.cgi   
2008-07-28 14:06:53 UTC (rev 953)
@@ -0,0 +1,31 @@
+#!/usr/bin/perl -T
+
+use strict;
+use warnings;
+
+use DBI;
+use CGI;
+
+my $dbh = DBI->connect("dbi:Pg:dbname=udd") or die $!;
+my $sth = $dbh->prepare(<<EOF
+       SELECT DISTINCT intrepid.package, (vote + popcon_src_max.old + recent + 
nofiles) as pvote
+        FROM (SELECT DISTINCT package FROM sources
+                WHERE distribution = 'ubuntu' and release = 'intrepid')
+          AS intrepid,
+             popcon_src_max
+        WHERE NOT EXISTS (SELECT * FROM sources WHERE distribution = 'debian'
+                          and package = intrepid.package)
+              AND popcon_src_max.package = intrepid.package AND 
popcon_src_max.distribution = 'ubuntu' ORDER BY pvote DESC;
+EOF
+       );
+
+$sth->execute() or die $!;
+
+my $q = CGI->new();
+
+print $q->header(-type => 'text/plain');
+while(my @row = $sth->fetchrow_array) {
+       my ($package, $score) = @row;
+       print "$package\t$score\n";
+}
+


Property changes on: 
udd/web/cgi-bin/sources_in_ubuntu_but_not_in_debian_by_popcon.cgi
___________________________________________________________________
Name: svn:executable
   + *


_______________________________________________
Collab-qa-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/collab-qa-commits

Reply via email to