r11152 - in /trunk/dh-make-perl: debian/changelog dh-make-perl
tincho-guest at users.alioth.debian.org
tincho-guest at users.alioth.debian.org
Thu Dec 13 03:50:51 UTC 2007
Author: tincho-guest
Date: Thu Dec 13 03:50:51 2007
New Revision: 11152
URL: http://svn.debian.org/wsvn/?sc=1&rev=11152
Log:
* Obtain a list of matching modules when querying CPAN (instead of just the
first match) to allow it to correctly choose between module names that
only differ in case. (Closes: #451838).
Modified:
trunk/dh-make-perl/debian/changelog
trunk/dh-make-perl/dh-make-perl
Modified: trunk/dh-make-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/dh-make-perl/debian/changelog?rev=11152&op=diff
==============================================================================
--- trunk/dh-make-perl/debian/changelog (original)
+++ trunk/dh-make-perl/debian/changelog Thu Dec 13 03:50:51 2007
@@ -2,8 +2,11 @@
* Replace erroneous reference to $opts{basepkgs} in extract_depends, thanks
to Hilko Bengen for the correction. (Closes: #452122).
-
- -- MartÃn Ferrari <martin.ferrari at gmail.com> Wed, 12 Dec 2007 09:50:22 -0300
+ * Obtain a list of matching modules when querying CPAN (instead of just the
+ first match) to allow it to correctly choose between module names that
+ only differ in case. (Closes: #451838).
+
+ -- MartÃn Ferrari <martin.ferrari at gmail.com> Thu, 13 Dec 2007 00:48:13 -0300
dh-make-perl (0.36) unstable; urgency=low
Modified: trunk/dh-make-perl/dh-make-perl
URL: http://svn.debian.org/wsvn/trunk/dh-make-perl/dh-make-perl?rev=11152&op=diff
==============================================================================
--- trunk/dh-make-perl/dh-make-perl (original)
+++ trunk/dh-make-perl/dh-make-perl Thu Dec 13 03:50:51 2007
@@ -286,8 +286,28 @@
$CPAN::Config->{'histfile'} = $ENV{'HOME'} . "/.cpan/history";
$CPAN::Config->{'keep_source_where'} = $ENV{'HOME'} . "/.cpan/source";
- $mod = CPAN::Shell->expand('Module', '/^'.$opts{cpan}.'$/')
- || die "Can't find '$opts{cpan}' module on CPAN\n";
+ # This modification allows to retrieve all the modules that
+ # match the user-provided string.
+ #
+ # expand() returns a list of matching items when called in list
+ # context, so after retrieving it, I try to match exactly what
+ # the user asked for. Specially important when there are
+ # different modules which only differ in case.
+ #
+ # This Closes: #451838
+ my @mod = CPAN::Shell->expand('Module', '/^'.$opts{cpan}.'$/')
+ or die "Can't find '$opts{cpan}' module on CPAN\n";
+ foreach(@mod) {
+ my $file = $_->cpan_file();
+ $file =~ s#.*/##; # remove directory
+ $file =~ s/(.*)-.*/$1/; # remove version and extension
+ $file =~ s/-/::/g; # convert dashes to colons
+ if($file eq $opts{cpan}) {
+ $mod = $_;
+ last;
+ }
+ }
+ $mod = shift @mod unless($mod);
$mod_cpan_version = $mod->cpan_version;
$cpanversion = $CPAN::VERSION;
$cpanversion =~ s/_.*//;
More information about the Pkg-perl-cvs-commits
mailing list