g-cpan or precisely /usr/lib/perl5/vendor_perl/5.8.8/Gentoo/Config.pm does not like the fallowing configuration in my /etc/make.conf. I do it this way, so I can easily switch them on and off. IMO it's absolutely OK to make it so (at least for portage)!? PORTDIR_OVERLAY="" PORTDIR_OVERLAY="${PORTDIR_OVERLAY} /opt/portage" PORTDIR_OVERLAY="${PORTDIR_OVERLAY} /usr/local/portage" The method getValue of the Gentoo::Config module has a problem with the selfreference to the variable, because of the while condition in which the getParamFromFile function is called. Since the condition is checking for more variables to substitute and the function call always will return another one, the whole script stays in an endless loop. A attach a patch in which I added a hash to use as a cache for the return values of getParamFromFile (could also use Memoize; not necessary for the fix). The selfreferences will be resolved by getParamFromFile itself (by remembering the previous value of the param and replacing variable occurences to the same param with the previous value). Installed Versions: sys-apps/portage-2.1.1-r2 app-portage/g-cpan-0.14.0 dev-lang/perl-5.8.8-r2 Also tried it with: app-portage/g-cpan-0.14.1_rc1 Hope the Patch is Helpfull! best wishes and happy xmas, Greter Marcel (marcel.greter@crevis.ch)
Created attachment 104529 [details, diff] Patch for /usr/lib/perl5/vendor_perl/5.8.8/Gentoo/Config.pm Here comes the patch file. I hope it's ok that I've added perl@gentoo.org to receive a CC.
Actually took a different approach to this problem in svn utilizing Shell::EnvImporter to bypass Gentoo::Config completely (and just treat make.conf and make.globals like bash env scripts to import) which fixes this bug and a few others (like "source /my/particular/setttings" lines - yeah, people will do anything ;). I'll leave this open for now, but I'm personally leaning towards the Shell::Env approach since it bypasses any sort of munging all together (at least on our part).
0.15_rc1 is in the tree and contains fixes that cover this bug.