git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] perl/Makefile: use 'installsitelib' even with NO_PERL_MAKEMAKER

From
NHNicholas Harteau <nrh@ikami.com>
Date
Feb 6, 2012, 20:30 UTC
Message-ID
<9D199309-85A6-42EE-9417-8C4E61534670@spotify.com>
In-Reply-To
<20120206202610.GC30776@sigill.intra.peff.net>
On Feb 6, 2012, at 3:26 PM, Jeff King wrote:
Show 37 quoted lines
> On Mon, Feb 06, 2012 at 02:38:20PM -0500, Nicholas Harteau wrote:
> 
>>> perl/Makefile installs Git.pm into $prefix/lib when ExtUtils::MakeMaker
>>> is not present.  perl can't "use Git;" in that scenario, as $prefix/lib
>>> isn't in perl's include path.
>>> 
>>> This patch installs Git.pm into perl's 'installsitelib', generally
>>> $prefix/lib/perl5/site_perl, so that even when ExtUtils::MakeMaker isn't
>>> present, Git.pm gets installed in a location where 'use Git;' just
>>> works.
>> [...]
>>> ifdef NO_PERL_MAKEMAKER
>>> -instdir_SQ = $(subst ','\'',$(prefix)/lib)
>>> +instdir_SQ = $(subst ','\'',$(subst installsitelib=,'',$(shell $(PERL_PATH_SQ) -V:installsitelib)))
> 
> Isn't this a regression if I am a non-root user installing into
> $HOME/local or similar? With MakeMaker, I end up with this in my
> perl.mak:
> 
>  PREFIX = /home/peff/local
>  ...
>  SITEPREFIX = $(PREFIX)
>  ...
>  INSTALLSITELIB = $(SITEPREFIX)/share/perl/5.14.2
> 
> which works great.  Before your patch, without MakeMaker, git would
> install into /home/peff/local/lib, which is also OK. But with your
> patch, it will try:
> 
>  $ perl -V:installsitelib
>  installsitelib='/usr/local/share/perl/5.14.2';
> 
> which is not writable by me, and the install will fail.
> 
> I know it's more convenient for some uses, because we know that
> installsitelib will be in perl's @INC. But git has always installed out
> of the box for non-root users, and I don't think we want to change that.
Totally correct - let me re-think the non-root case.  Thanks.

-- Nicholas Harteau nrh@spotify.com

Previous: Jeff KingNext: Jeff King
Message 4 of 5 in “use 'installsitelib' even with NO_PERL_MAKEMAKER”
  1. use 'installsitelib' even with NO_PERL_MAKEMAKERNicholas Harteau, Jan 30, 2012
  2. Nicholas HarteauFeb 6, 2012
  3. Jeff KingFeb 6, 2012
  4. Nicholas HarteauFeb 6, 2012
  5. Jeff KingFeb 6, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.