Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 176630 - g-cpan doesn't install modules
Summary: g-cpan doesn't install modules
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-30 22:25 UTC by 2bios2001
Modified: 2008-12-19 21:11 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
fix source directories (gentoo-cpan-tempdir.patch,535 bytes, patch)
2007-06-29 09:09 UTC, Vincent Pit
Details | Diff
fix source directories 2 (gentoo-cpan-tempdir.patch,541 bytes, patch)
2007-06-29 09:19 UTC, Vincent Pit
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description 2bios2001 2007-04-30 22:25:44 UTC
Everytime I try to install a module g-cpan says that there's nothing to do

Reproducible: Always

Steps to Reproduce:
1. g-cpan -i Math::Calc::Units
2.
3.

Actual Results:  
# g-cpan -i Math::Calc::Units
-CPAN: Storable loaded ok
Going to read /var/tmp/g-cpan/.cpan/Metadata
 * Nothing to install!!
# g-cpan -iv Math::Calc::Units
 * Getting CPAN Info for Math::Calc::Units
-CPAN: Storable loaded ok
Going to read /var/tmp/g-cpan/.cpan/Metadata
 * Nothing to install!!
 * Cleaning temporary space
# perl -e 'use Math::Calc::Units qw(convert); print convert ("13 Kb", "bytes");'
Can't locate Math/Calc/Units.pm in @INC (@INC contains: /etc/perl /usr/lib/perl5/vendor_perl/5.8.8/i686-linux /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/site_perl/5.8.8/i686-linux /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/5.8.8/i686-linux /usr/lib/perl5/5.8.8 /usr/local/lib/site_perl .) at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
 # eix -c g-cpan
[I] app-portage/g-cpan (0.15.0@30.04.2007): g-cpan: generate and install CPAN modules using portage
 # g-cpan -i Math::Units
-CPAN: Storable loaded ok
Going to read /var/tmp/g-cpan/.cpan/Metadata
Strange distribution name [Math::Units]
 * Math::Units is not a CPAN module!
 * Nothing to install!!
 # g-cpan -i X::Osd
-CPAN: Storable loaded ok
Going to read /var/tmp/g-cpan/.cpan/Metadata
 * Nothing to install!!
 # g-cpan -i Wx::Perl::Packager
-CPAN: Storable loaded ok
Going to read /var/tmp/g-cpan/.cpan/Metadata
 * Nothing to install!!
 #

Expected Results:  
I've never got a module installed with g-cpan

I'm using g-cpan 0.15.0
Comment 1 Vincent Pit 2007-06-29 09:09:58 UTC
Created attachment 123371 [details, diff]
fix source directories

CPAN unpacks distributions into temporary directories formatted like DistName-Version-XXXXXX, with X random letters, but emerge unpacks them into DistName-Version. Gentoo::CPAN does not get rid of this random part when setting the portage source directory (you can see it in the ebuilds generated by g-cpan), which obviously breaks when ebuilds are processed. This patch fixes Gentoo::CPAN so that it gives the source directory expected by emerge.

g-cpan may also need the fix of #183625 to handle correctly Makefile.PL and Build.PL.
Comment 2 Vincent Pit 2007-06-29 09:19:28 UTC
Created attachment 123373 [details, diff]
fix source directories 2

The temp pattern also contains digits. Ditto.
Comment 3 Bernhard Frauendienst 2007-08-23 14:56:50 UTC
Any news on this one? Seems to be still relevant in 0.15.0-r1
Comment 4 Sergiy Borodych 2007-08-29 13:06:53 UTC
yes in
app-portage/g-cpan-0.15.0-r1
it bug exists also
Comment 5 Bernhard Frauendienst 2007-11-18 15:16:36 UTC
I don't get it... isn't that a showstopper for everyone? At least for me, none of the created ebuilds work (they emerge, yes, but don't install anything). 
Shouldn't that be fixed pronto, or does it just affect a small percentage of users?
Comment 6 Christian Hartmann (RETIRED) gentoo-dev 2007-11-19 11:06:23 UTC
Yes it should be fixed but g-cpan is currently unmaintained. That's why it's not.
Comment 7 Michael Cummings 2007-11-19 12:11:46 UTC
Just tested with a fresh vmware image of gentoo, running g-cpan-0.15-rc1, and
Math::Calc::Units installed and the example line gave back 13312 bytes. I'm
curious - does  portage list Math-Calc-Units as already being installed
(ignoring what perl/g-cpan may think). Not negating what Vincent added, if you
jumped your cpan install to a later version that distributed with core you
certainly run the risk of all kinds of helper tools breaking.
Comment 8 Michael Cummings 2007-11-19 14:40:11 UTC
devs - patch doesn't look bad (no offense to the author, its a hack fix - but then so is the rest of my code ;). The value that's being filled (ultimately) should be based on the results of Archive::Tar or similar's output on the tree structure of the compressed module, but that wouldn't be a quick or painless fix to add. 

/me votes for adding patch as is and getting this fixed 
Comment 9 michael@smith-li.com 2008-02-27 21:41:59 UTC
OK, the patch applies cleanly etc, but even when I used unpatched versions of g-cpan I wasn't able to duplicate this bug.

-1) emerge -C Math-Calc-Units
 0) emerge =app-portage/g-cpan-0.15.0-r2
 1) rm -r /var/tmp/portage
 2) rm -r /var/tmp/g-cpan
 3) g-cpan -iv Math::Calc::Units
 4) $ perl -e 'use Math::Calc::Units qw(convert); print convert ("13 Kb", "bytes");'
13312 bytes(test)

What am I missing?
Comment 10 2bios2001 2008-04-24 08:17:50 UTC
0.15.0 got masked and a 0.15.0-r1 was released. it works now
Comment 11 michael higgins 2008-12-19 21:11:37 UTC
Please re-open as this still breaks like this on my system. IDK if it is perl 5.10.0 related, or not, but the behavior is the same, random crap after WORKDIR causes nothing to be built or installed as it's not found.