[Collab-qa-commits] r329 - tools/bugs2packagelist
abi at alioth.debian.org
abi at alioth.debian.org
Wed Jul 11 08:12:07 UTC 2007
Author: abi
Date: 2007-07-11 08:12:06 +0000 (Wed, 11 Jul 2007)
New Revision: 329
Modified:
tools/bugs2packagelist/bts2pkglist.pl
Log:
works now ..
Modified: tools/bugs2packagelist/bts2pkglist.pl
===================================================================
--- tools/bugs2packagelist/bts2pkglist.pl 2007-07-10 13:09:27 UTC (rev 328)
+++ tools/bugs2packagelist/bts2pkglist.pl 2007-07-11 08:12:06 UTC (rev 329)
@@ -32,7 +32,7 @@
}
my $c = new SOAP::Lite
- uri => '/Debbugs/SOAP/Usertag',
+ uri => '/Debbugs/SOAP',
proxy => 'http://bugs.debian.org/cgi-bin/soap.cgi'
;
@@ -47,20 +47,20 @@
$l = $bugs->{"$user_tag"};
}
-my $c = new SOAP::Lite
- uri => '/Debbugs/SOAP/Status',
- proxy => 'http://bugs.debian.org/cgi-bin/soap.cgi'
- ;
+open(INFILE, $pkglist);
+my @proc = grep(/NNN:/, <INFILE>);
+close(INFILE);
-my $cmd;
-foreach my $f (@$l) {
- my $s = $c->get_status($f) or die 'something bad happened';
- my $d = $s->result;
- #$d->{$f}->{'package'} -> package name
- #$f -> bug id
- #$d->{$f}->{'subject'} -> bug subject
- # call sed or whatever here
- if ( $d ) {
- # call sed or whatever here
- }
+foreach my $line (@proc) {
+ my ($pkg, $tmp) = split(/ /, $line);
+
+ my $hdl = $c->get_bugs('bugs', $l, 'package', $pkg);
+ my $bug = $hdl->result;
+
+ if( ! $bug->[0] ) {
+ print "no bug found for package: $pkg\n";
+ } else {
+ system("/bin/sed -i '/^$pkg/ s/NNN:/\#$bug->[0]:/' $pkglist");
+ print "$pkg bug:".$bug->[0]."\n";
+ }
}
More information about the Collab-qa-commits
mailing list