r52911 - in /trunk/dh-make-perl: TODO lib/DhMakePerl.pm t/dists.t
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Tue Feb 16 22:23:00 UTC 2010
Author: dmn
Date: Tue Feb 16 22:22:53 2010
New Revision: 52911
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=52911
Log:
use Debian::WNPP::Query for querying wnpp bug lists
TODO--
Modified:
trunk/dh-make-perl/TODO
trunk/dh-make-perl/lib/DhMakePerl.pm
trunk/dh-make-perl/t/dists.t
Modified: trunk/dh-make-perl/TODO
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/TODO?rev=52911&op=diff
==============================================================================
--- trunk/dh-make-perl/TODO (original)
+++ trunk/dh-make-perl/TODO Tue Feb 16 22:22:53 2010
@@ -4,9 +4,6 @@
May be similar to #525847
* when ITP for the package is found, try to deduce short/long description from
the bug report
-* get_wnpp() should look at http://www.debian.org/devel/wnpp/prospective (or
- requested and being_packaged), cache the resulting hash and update the cache
- daily
* add new command, --trace-depends. To be used like
dh-make-perl --trace-depends --cpan Foo-Bar
Modified: trunk/dh-make-perl/lib/DhMakePerl.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/DhMakePerl.pm?rev=52911&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/DhMakePerl.pm (original)
+++ trunk/dh-make-perl/lib/DhMakePerl.pm Tue Feb 16 22:22:53 2010
@@ -47,7 +47,7 @@
use Debian::Dependencies ();
use Debian::Dependency ();
use Debian::Version qw(deb_ver_cmp);
-use Debian::WNPP::Bug;
+use Debian::WNPP::Query;
use Parse::DebianChangelog;
use DhMakePerl::Config;
use DhMakePerl::PodParser ();
@@ -1244,32 +1244,10 @@
return undef unless $self->cfg->network;
- my $wnpp
- = "http://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=wnpp;includesubj=ITP: $package";
- my $mech = WWW::Mechanize->new();
-
- eval { $mech->get($wnpp) };
- if ($@) {
- warn "Error while looking for ITP of $package:\n";
- warn $@;
- return undef;
- }
-
- my @links = $mech->links();
-
- foreach my $link (@links) {
- my $desc = $link->text();
-
- if ( $desc && $desc =~ /^ITP: $package / ) {
- return Debian::WNPP::Bug->new(
- type => 'ITP',
- number => $1,
- title => $desc
- ) if $link->url =~ m/bug=(\d+)$/;
- }
-
- }
- return undef;
+ my $wnpp = Debian::WNPP::Query->new(
+ { cache_file => catfile( $self->cfg->home_dir, 'wnpp.cache' ) } );
+ my @bugs = $wnpp->bugs_for_package($package);
+ return $bugs[0];
}
sub check_for_xs {
Modified: trunk/dh-make-perl/t/dists.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/t/dists.t?rev=52911&op=diff
==============================================================================
--- trunk/dh-make-perl/t/dists.t (original)
+++ trunk/dh-make-perl/t/dists.t Tue Feb 16 22:22:53 2010
@@ -104,6 +104,8 @@
rmdir "$dist/debian" or die "rmdir($dist/debian): $!";
unlink "$Bin/contents/Contents.cache" or die "unlink($Bin/contents.cache): $!";
+ -e "$Bin/contents/wnpp.cache" and unlink "$Bin/contents/wnpp.cache"
+ or die "unlink($Bin/contents/wnpp.cache): $!";
}
$ENV{DEBFULLNAME} = "Joe Maintainer";
More information about the Pkg-perl-cvs-commits
mailing list