Bug#688842: CPAN modules no longer installed to /usr/local by default

Dominic Hargreaves dom at earth.li
Sun Oct 21 15:30:27 UTC 2012


On Wed, Oct 17, 2012 at 05:20:00PM +0300, Niko Tyni wrote:
> 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.

Nice work - the patch looks fine to me and I've tested it appears to
fix the problem discussed on this report (I actually tested
ntyni/for-wheezy at 154f2c7768c838e1b278a73eabec545865df0508).

-- 
Dominic Hargreaves | http://www.larted.org.uk/~dom/
PGP key 5178E2A5 from the.earth.li (keyserver,web,email)




More information about the Perl-maintainers mailing list