Bug#688842: CPAN modules no longer installed to /usr/local by default
Niko Tyni
ntyni at debian.org
Wed Oct 17 14:20:00 UTC 2012
tag 688842 patch
thanks
On Wed, Oct 03, 2012 at 11:41:30AM +0300, Niko Tyni wrote:
> On Wed, Sep 26, 2012 at 09:12:00AM +0300, Niko Tyni wrote:
> > When the site dirs don't exist, the CPAN shell interactive configuration states
> > Warning: You do not have write permission for Perl library directories.
> > and proceeds to suggest local::lib for installation, which is not the
> > optimal suggestion for root users.
> My current thinking is that a minimally invasive fix would be a loop
> that tests the first existing directory up the tree for writability.
> This way we can leave the mkdir part (along with umask settings,
> see debian/patches/debian/writable_site_dirs.diff) for later.
Looking at the issue, I realized that we don't want to test the
writability of the core dirs (install*lib) on Debian at all. We're
configuring CPAN to pass INSTALLDIRS=site precisely to keep it from
touching the core directories.
This way root and non-root users who have write access to /usr/local
will get the right default (system-wide install), and the rest will be
prompted about using local::lib or sudo.
Here's my first take on a patch. It seems to work, but eyeballs
and testing would be welcome.
While I've marked the patch as Debian specific, I tried to keep the
directory name handling portable in the hope at least part of it can go
upstream at some point.
--
Niko Tyni ntyni at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cpan-missing-site-dirs.diff
Type: text/x-diff
Size: 2281 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/perl-maintainers/attachments/20121017/5f041f43/attachment.diff>
More information about the Perl-maintainers
mailing list