Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 64403

Summary: g-cpan.pl fails on CPAN modules with .pm in filename
Product: Gentoo Linux Reporter: Julie Brandon <julie-gentoo>
Component: [OLD] DevelopmentAssignee: Gentoo Perl team <perl>
Status: RESOLVED FIXED    
Severity: minor    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch to fix .pm breakage in g-cpan.pl

Description Julie Brandon 2004-09-17 07:25:36 UTC
Some module tarballs on CPAN do not follow the filename convention of modulename-version.tar.gz, instead calling themselves modulename.pm-version.tar.gz (for example the CGI module).

The regular expression in g-cpan's portage_dir sub fails to correctly convert these filenames to ebuild directories.

Reproducible: Always
Steps to Reproduce:
1. Install CGI.pm from normal emerge commands
2. Run g-cpan.pl CGI::Application
3. Observe!
Actual Results:  
g-cpan.pl will always try to re-install CGI, as it can't find ebuild 
directory 'CGI.pm'



Expected Results:  
Detect that CGI is already installed.


Managed to cure the issue by simple modification of the regular expression in 
portage_dir sub to remove any trailing ".pm".
Comment 1 Peter Leonard 2004-11-16 16:56:15 UTC
Created attachment 44119 [details, diff]
Patch to fix .pm breakage in g-cpan.pl


Ran into the exact same problem myself, added the following patch to remove the

trailing .pm from CPAN module names.

Not heavily tested, but it allowed me to finally install CGI::Application,
which depended on CGI.pm.
Comment 2 Michael Cummings (RETIRED) gentoo-dev 2005-03-14 08:56:48 UTC
Applied in next version of g-cpan (so next version of portage)