/[collab-qa]/udd/web/cgi-bin/packages_in_unstable_but_not_in_testing_by_popcon.cgi
ViewVC logotype

Contents of /udd/web/cgi-bin/packages_in_unstable_but_not_in_testing_by_popcon.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 966 - (hide annotations) (download)
Mon Jul 28 16:49:58 2008 UTC (4 years, 10 months ago) by neronus-guest
File size: 823 byte(s)
Modified CGI scripts to use new popcon tables/views
1 neronus-guest 950 #!/usr/bin/perl -T
2    
3     use strict;
4     use warnings;
5    
6     use DBI;
7     use CGI;
8    
9     my $dbh = DBI->connect("dbi:Pg:dbname=udd") or die $!;
10     my $sth = $dbh->prepare(<<EOF
11 neronus-guest 966 SELECT DISTINCT unstable.package, insts
12 neronus-guest 950 FROM (SELECT DISTINCT package FROM packages
13     WHERE distribution = 'debian' and release = 'sid')
14     AS unstable,
15     popcon
16     WHERE NOT EXISTS (SELECT * FROM packages where distribution = 'debian'
17     AND release = 'lenny' and package = unstable.package)
18 neronus-guest 966 AND popcon.package = unstable.package AND popcon.distribution = 'debian' ORDER BY insts DESC;
19 neronus-guest 950 EOF
20     );
21    
22     $sth->execute() or die $!;
23    
24     my $q = CGI->new();
25    
26     print $q->header(-type => 'text/plain');
27     while(my @row = $sth->fetchrow_array) {
28     my ($package, $score) = @row;
29     print "$package\t$score\n";
30     }
31    

  ViewVC Help
Powered by ViewVC 1.1.5