r34704 - in /trunk/dh-make-perl: debian/changelog lib/DhMakePerl.pm
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Sun May 3 16:03:38 UTC 2009
Author: dmn
Date: Sun May 3 16:03:30 2009
New Revision: 34704
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=34704
Log:
when a dependency module package is not found, guess the package name after the CPAN distribution that contains the module
Modified:
trunk/dh-make-perl/debian/changelog
trunk/dh-make-perl/lib/DhMakePerl.pm
Modified: trunk/dh-make-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/debian/changelog?rev=34704&op=diff
==============================================================================
--- trunk/dh-make-perl/debian/changelog (original)
+++ trunk/dh-make-perl/debian/changelog Sun May 3 16:03:30 2009
@@ -20,6 +20,8 @@
perl-modules 5.10 (on which we already depend)
* move CPAN configuration into a method
* move finding CPAN module object for given module name into a method
+ * when a dependency module package is not found, guess the package name
+ after the CPAN distribution that contains the module
-- gregor herrmann <gregoa at debian.org> Mon, 27 Apr 2009 16:42:59 +0200
Modified: trunk/dh-make-perl/lib/DhMakePerl.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/DhMakePerl.pm?rev=34704&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/DhMakePerl.pm (original)
+++ trunk/dh-make-perl/lib/DhMakePerl.pm Sun May 3 16:03:30 2009
@@ -993,6 +993,27 @@
if ($deb) {
print "+ $module found in $deb\n" if $self->cfg->verbose;
+ }
+ else {
+ print "- $module not found in any package\n";
+ push @missing, $module;
+
+ my $mod = $self->find_cpan_module($module);
+ if ($mod) {
+ my $dist = $mod->distribution->base_id =~ s/-v?\d[^-]*$//;
+ my $pkg = 'lib' . lc($dist) . '-perl';
+
+ print " CPAN contains it in $dist\n";
+ print " substituting package name of $pkg\n";
+
+ $deb = $pkg;
+ }
+ else {
+ print " - it seems it is not available even via CPAN\n";
+ }
+ }
+
+ if ($deb) {
if ( exists $dep_hash->{$module} ) {
my $v = $dep_hash->{$module};
$v =~ s/^v//; # strip leading 'v' from version
@@ -1018,10 +1039,6 @@
else {
$debs += Debian::Dependency->new($deb);
}
- }
- else {
- print "- $module not found in any package\n";
- push @missing, $module;
}
}
More information about the Pkg-perl-cvs-commits
mailing list