Bug#777718: cpan2deb using wrong module from CPAN

Damyan Ivanov dmn at debian.org
Wed Feb 11 21:29:44 UTC 2015


Package: dh-make-perl
Version: 0.84-1
Severity: normal
Tags: upstream confirmed

-=| gregor herrmann, 10.02.2015 21:35:13 +0100 |=-
> On Tue, 10 Feb 2015 19:33:11 +0000, Andrew Beverley wrote:
> 
> > > % cpan2deb DBIx::Class 
> > 
> > Okay, this is interesting. That command does indeed work correctly for
> > me. However, if I then do cpan2deb DBIx-Class it picks the wrong version
> >                                       ^^^
> 
> Oh, interesting.
>  
> > So if I use '::' it uses the correct one, if I use '-' it uses the wrong
> > one. Is there a subtle difference between them that I'm not aware of?
> 
> If there is I'd call it a bug :)

Indeed, let's report it as such.

> Let me try as well:
> 
> % cpan2deb DBIx-Class        
> == dh-make-perl 0.84 ==             
> CPAN: Term::ANSIColor loaded ok (v4.02)
> CPAN: File::HomeDir loaded ok (v1.00)
> Reading '/home/gregoa/.cpan/Metadata'
>   Database was generated on Tue, 10 Feb 2015 16:53:15 GMT
> CPAN: Time::HiRes loaded ok (v1.9726)
> Fetching with LWP:
> ftp://cpan.inode.at/authors/id/A/AB/ABRAXXA/DBIx-Class-0.08195.tar.gz
> CPAN: Digest::SHA loaded ok (v5.88)
> Fetching with LWP:
> ftp://cpan.inode.at/authors/id/A/AB/ABRAXXA/CHECKSUMS
> Checksum for /home/gregoa/.cpan/sources/authors/id/A/AB/ABRAXXA/DBIx-Class-0.08195.tar.gz ok
> 
> Indeed. 
> 
> But:
> 
> % dh-make-perl --cpan DBIx-Class
> == dh-make-perl 0.84 ==
> CPAN: Term::ANSIColor loaded ok (v4.02)
> CPAN: File::HomeDir loaded ok (v1.00)
> Reading '/home/gregoa/.cpan/Metadata'
>   Database was generated on Tue, 10 Feb 2015 16:53:15 GMT
> CPAN: Digest::SHA loaded ok (v5.88)
> Checksum for /home/gregoa/.cpan/sources/authors/id/R/RI/RIBASUSHI/DBIx-Class-0.082810.tar.gz ok
> 
> So same as for you, and the bug is really only in cpan2deb (i.e.
> dh-make-perl called as cpan2deb). Hm? Weird.
> 
> Does anyone on the list quickly see where this comes from? Otherwise
> we should file a bug at least.

The glitch is in DhMakePerl::Config::parse_command_line_options

When run as 'dh-make-perl --cpan Foo-Bar', the $self->cpan value is 
massaged and Foo-Bar is converted to Foo::Bar. When run as cpan2deb, 
no such massaging is done.

This seems to make a difference when requesting the tarball from 
CPAN.pm. Requesting 'DBIx-Class' "module" gets us the stale version. 
Requesting 'DBIx::Class' seems to make it all work as expected.

I have a fix ready and will commit it after I get the bug number.


-- dam



More information about the pkg-perl-maintainers mailing list