[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#627578: Please, restore the work-needing packages report



Subject: Please, restore the work-needing packages report
Package: qa.debian.org
Severity: wishlist
Tags: patch
User: qa.debian.org@packages.debian.org
Usertag: wnpp

Hi,

No one commented (or committed) the patch I proposed last month, that's
why I now fill a bug to track this issue.

> Le 22/04/2011 15:12, Raphael Hertzog a écrit :
>> On Thu, 21 Apr 2011, David Prévot wrote:
>>> Would it be a good idea to convert this script to use the Debbugs' SOAP
>>> interface instead of bts2ldap? Could someone please point where the code
>>> would be publicly available?
>>
>> maintainers-needed.pl in http://svn.debian.org/wsvn/qa/trunk/data/wnpp/
>
> Thanks, please make sure that libsoap-lite-perl is installed before
> applying this patch.

I just checked that it is already among debian.org-qa.debian.org
dependencies, so this should already be installed.

I noticed that gnat-4.4, that has two RFH bugs, is only listed once,
don't know if it's a bug or a feature, but will try to fix it if you
consider it a bug (my guess is those two bugs should just be merged, but
a second PoV is welcome).

For example, on <http://www.debian.org/devel/wnpp/>, I updated the
number of packages in need of help to actually show 64 while there are
at least 65 bugs in <http://www.debian.org/devel/wnpp/help_requested>.

Regards

David


Index: maintainers-needed.pl
===================================================================
--- maintainers-needed.pl	(révision 2516)
+++ maintainers-needed.pl	(copie de travail)
@@ -5,6 +5,7 @@
 # Copyright (C) 2004, 2005  Martin Michlmayr <tbm@cyrius.com>
 # Copyright (C) 2004  Frank Lichtenheld <djpig@debian.org>
 # Copyright (C) 2005, 2006  Christoph Berg <myon@debian.org>
+# Copyright (C) 2011 David Prévot <david@tilapin.org>
 # $Id$
 
 # This program is free software; you can redistribute it and/or modify
@@ -24,7 +25,7 @@
 use strict;
 use warnings;
 
-use Net::LDAP;
+use SOAP::Lite;
 use Date::Parse;
 use Mail::Header;
 use DB_File;
@@ -45,7 +46,6 @@
 }
 #$mail = "> report.txt";
 
-my $BTS2LDAP = "/org/qa.debian.org/data/bts/bts2ldap-filter '^debbugsPackage:\\s*wnpp\$' |";
 my $GETPACKAGES = "/org/qa.debian.org/data/ftp/get-packages";
 my @UNS_ARCHS = glob "/org/qa.debian.org/ftp/debian/dists/unstable/main/binary-*";
 my $UNS_ARCHS = "@UNS_ARCHS";
@@ -53,28 +53,28 @@
 @UNS_ARCHS = split / /, $UNS_ARCHS;
 my $POPCONDB = "/org/qa.debian.org/data/popcon/popcon.db";
 
+my $soap = SOAP::Lite->uri('Debbugs/SOAP')->proxy('http://bugs.debian.org/cgi-bin/soap.cgi')
+       or die "Couldn't make connection to SOAP insterface: $@";
+my $bugs = $soap->get_bugs(package=>'wnpp')->result;
+my $status = $soap->get_status($bugs)->result() or die;
+
 my $curtime = time;
 
-open INDEX, $BTS2LDAP or die "Couldn't open BTS LDAP index file: $!";
 my (@rfa, @orphaned, @rfh, %pkginfo);
-while (1) {
-    my $reader = new Mail::Header \*INDEX;
-    last unless $reader->get("debbugsID");
-    last unless $reader->get("debbugsID") > 0;
-    next unless $reader->get("debbugsState") =~ /^(open|forwarded)$/;
-    next if grep $_ eq "fixed\n", $reader->get("debbugsTag");
-    my $package = $reader->get("debbugsPackage");
-    chomp($package);
-    my $bugnr = $reader->get("debbugsID");
-    chomp($bugnr);
-    my $title = $reader->get("debbugsTitle");
-    chomp($title);
+ALLPKG: foreach my $bugnr (@$bugs) {
+    next if $status->{$bugnr}->{done};
+    next if $status->{$bugnr}->{archived};
+    my $title = $status->{$bugnr}->{subject};
     if (! $title) {
         print $bugnr, "\n";
         next;
     }
     next unless $title =~ /^(?:RFA|ITO|O|RFH):/;
-    my $date = $reader->get("debbugsDate");
+    my $mergedwith = $status->{$bugnr}->{mergedwith};
+    foreach my $merged (split ' ',$mergedwith) {
+          next ALLPKG if int($merged) < int($bugnr);
+    }
+    my $date = $status->{$bugnr}->{date};
     my $age = ($curtime - $date)/86400;
     # there are all kinds of broken bug titles; one common type are bugs
     # without a description separated from the package name by --.  If
@@ -119,7 +119,6 @@
         }
     }
 }
-close INDEX;
 
 $/ = "";
 if (open PCKG, "$GETPACKAGES -s unstable -a source|") {


Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: