Bug#533707: CPANP not acting consistently with CPAN

Niko Tyni ntyni at debian.org
Sun Jul 5 21:25:40 UTC 2009


found 533707 5.10.0-19
thanks

On Fri, Jun 19, 2009 at 04:34:53PM -0500, Evan Carroll wrote:
> Severity: serious
> Tags: confirmed
> Package: perl
> 
> In an attempt to solve other bugs with Debian playing well with CPAN,
> I've come across a new one. It appears as if CPANPLUS is not
> configured to behave like CPAN.pm.

Thanks for the report and sorry for the delay. I just got back from vacation.

Please leave the 'confirmed' tag to the maintainer in the future, see
 http://www.debian.org/Bugs/Developer#tags

> In /etc/perl/CPAN/Config.pm you'll find
> 'makepl_arg' => q[INSTALLDIRS=site],

Yes, this originally comes from a Debian patch to CPAN::FirstTime.

 http://patch-tracking.debian.net/patch/series/view/perl/5.10.0-23/debian/cpan_definstalldirs.diff

> (might also want mbuildpl_arg)

Right. I see CPAN now prefers Build.PL over Makefile.PL by default via the
'prefer_installer' option. Running for instance 'cpan Cwd' thus has the
same problem as cpanp: it tries to write in /usr instead of /usr/local
because PathTools specifies "installdirs => 'core'".

> There is nothing like this for CPANP in the Debian configuration.
> Assuming that you're using a version that can be updated, you can test
> this and see the problems with it by updating Archive::Extract.

It looks like the analogous fix to the CPAN one would be to change the
default 'buildflags' and 'makemakerflags' in lib/CPANPLUS/Config.pm.
I'm not quite sure if the file should go in /etc/perl too, will have to
think about that.


A complication with the CPAN mbuildpl_arg issue is that we're only
changing the default for the first time configuration, and if the user
has already run 'cpan', it's too late because the old bad default is
now in /etc/perl/CPAN/Config.pm (or ~/.cpan/CPAN/MyConfig.pm .)

Given that this affects only a subset of core modules, I suppose we
shouldn't worry overmuch. An entry in NEWS.Debian is the best thing
I can think of, and even that might be considered too annoying by the
overwhelming majority of the users that are never going to reinstall a
core module that has a Build.PL.

The CPANPLUS settings aren't saved automatically AFAICS (one needs to do
an explicit 's save' in the cpanp shell) so the configuration persistence
is less of a problem in that case.

I'll try to get a fix in sid this week.
-- 
Niko Tyni   ntyni at debian.org






More information about the Perl-maintainers mailing list