git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: git@vger.kernel.org, abbotti@mev.co.uk
Subject: Re: Question about PERL_PATH
Date: Sat, 7 May 2011 20:13:26 -0400	[thread overview]
Message-ID: <20110508001326.GA13282@sigill.intra.peff.net> (raw)
In-Reply-To: <robbat2-20110507T174237-068953557Z@orbis-terrarum.net>

On Sat, May 07, 2011 at 06:02:48PM +0000, Robin H. Johnson wrote:

> On Fri, May 06, 2011 at 09:05:08AM -0700,  Junio C Hamano wrote:
> > The variable is not PERL_COMMAND_LINE, but is PERL_PATH, so I think it
> > should expects the path to the program.
> > 
> > Our testsuite also rely on it being the path to the program by enclosing
> > the reference to it inside double quotes, to make sure that PERL_PATH set
> > to "/Program Files/Perl/perl.exe" works.  Didn't Gentoo folks see any test
> > breakage before shipping the ebuild procedure?
> The entire test suite completes fine with our
> PERL_PATH="${EPREFIX}/usr/bin/env perl" setting.

This is more luck than anything. For example, you are skipping all of
the perl tests (t9700) and all of the git-svn tests (t91*), because they
both try do something like:

  if ! "$PERL_PATH" -e "use SomeModule"; then
    skip_all="You don't have SomeModule installed"
  fi

So you are skipping many tests accidentally, and it is only luck that
all such uses are currently tests that handle a broken "$PERL_PATH" in
this way. It is entirely likely that this usage may end up causing a
test suite failure at some point in the future.

If we want to support this use of env/, we need to provide separate
Makefile variables for "what goes at the top of a perl script" and "what
we use to run perl".

> This was originally put into place because of our bug #326625 [1].
> From that bug:
> ====
> Git does not compile if local::lib installed in user's home directory if
> 'sudo' is used to raise privileges. Local::lib exports environment
> variable PERL5_MM_OPTS, which contains string INSTALL_BASE='...'.
> Variable PREFIX is set in package's Makefile.pl. Package will not
> compile if both of these variables are set.
> ====
> (Full logs attached in the bug).
> 
> If you can suggest a better way to fix the user's bug, I'll revert the
> PERL_PATH change.

It looks like we auto-build the perl bits of the Makefile by calling:

  $(PERL_PATH) Makefile.PL PREFIX=$(prefix) INSTALL_BASE=''

which seems to me like it should override local::lib's INSTALL_BASE
(which also doesn't seem ideal, but I wouldn't expect it to cause this
error). But surely the solution involves changing this line in
perl/Makefile to handle the local::lib case?

I also don't see how this is git-specific. From my reading of the bug
report, local::lib will fail to work any time the user does:

  perl Makefile.PL PREFIX=anything

which seems odd. Wouldn't other packages be running into this problem,
then, too (i.e., anything which has a little bit of perl and
automagically runs MakeMaker on behalf of the user)?

-Peff

  reply	other threads:[~2011-05-08  0:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-06 13:30 Question about PERL_PATH Ian Abbott
2011-05-06 15:56 ` Michael J Gruber
2011-05-06 16:05 ` Junio C Hamano
2011-05-06 16:42   ` Ian Abbott
2011-05-07 18:02   ` Robin H. Johnson
2011-05-08  0:13     ` Jeff King [this message]
2011-05-09 14:49     ` Drew Northup

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110508001326.GA13282@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=abbotti@mev.co.uk \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).