git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kang-min Liu <gugod@gugod.org>
To: "Randy J. Ray" <rjray@blackperl.com>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Git Mailing List" <git@vger.kernel.org>,
	"Kang-min Liu" <gugod@gugod.org>
Subject: Re: Git's Perl scripts can fail if user is configured for perlbrew
Date: Tue, 30 Dec 2014 00:09:12 +0100	[thread overview]
Message-ID: <m2iogujbon.fsf@gugod.org> (raw)
In-Reply-To: <54A1C29C.4090100@blackperl.com>



> On 12/29/14, 7:21 AM, Ævar Arnfjörð Bjarmason wrote:
>> [CC'd the perlbrew author]
>>
>> This is a bit of a tricky issue.
>>
>> Using whatever perl is defined in the environment is just as likely to
>> break, in general the build process tries to pick these assets at
>> compile-time. Imagine you're experimenting with some custom perl
>> version and now Git inexplicably breaks.
>>
>> It's better if Git detects a working perl when you compile it and
>> sticks with that, which is why we use /usr/bin/perl by default.

With "perl" being an external dependency, sticking with whatever at the
compile time basically means these should stick:

- `which perl`, and the same $Config options
- Every module contained in PERL5LIB
- Other external executable dependencies of some .pm files that lives
  somewhere in PATH

We could of course build an app bundle dir like a lightweight container.
to mitigate this... but that would'nt be usefull without tweaking the
shebang line of the scripts -- to point to the perl script (shim or
real) that should be compatible with the newly built git.

I'd argue that trying to compile git (or other stuff in general) against
a perlbrew-managed perl is something that "perlbrew" executable cannot
manage. Because it is both valid that the user is doing this
intentionally and want the outcome, or the user is doing this
unintentionally. And even if we have a shim "perl" script, it would'nt
help as long as it is the "whatever perl" in PATH -- which might just be
incompitble.

I wonder if disabling perlbrew per-building can deal with this:

    'perlbrew off'

If this end up changing the shebang line then maybe, if not then it'll
still intefere after perlbrew is re-activated.

The other option to minimize perlbrew interferince is of course to
completely deprecate the global env var approach and make them project
local. But that's another story.

-- 
Cheers,
Kang-min Liu

  reply	other threads:[~2014-12-29 23:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-28 22:36 Git's Perl scripts can fail if user is configured for perlbrew Randy J. Ray
2014-12-29 13:21 ` Ævar Arnfjörð Bjarmason
2014-12-29 21:07   ` Randy J. Ray
2014-12-29 23:09     ` Kang-min Liu [this message]
2014-12-29 13:40 ` Torsten Bögershausen
2014-12-29 21:57   ` Randy J. Ray
2014-12-29 23:16     ` Ævar Arnfjörð Bjarmason
2015-01-02  3:08 ` Ben Aveling

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=m2iogujbon.fsf@gugod.org \
    --to=gugod@gugod.org \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=rjray@blackperl.com \
    /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).