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
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.
Created attachment 123373 [details, diff] fix source directories 2 The temp pattern also contains digits. Ditto.
Any news on this one? Seems to be still relevant in 0.15.0-r1
yes in app-portage/g-cpan-0.15.0-r1 it bug exists also
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?
Yes it should be fixed but g-cpan is currently unmaintained. That's why it's not.
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.
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
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?
0.15.0 got masked and a 0.15.0-r1 was released. it works now
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.