From: Dan Jacques <dnj@google.com>
To: avarab@gmail.com
Cc: Johannes.Schindelin@gmx.de, dnj@google.com, git@vger.kernel.org,
gitster@pobox.com
Subject: Re(2): [PATCH 1/1] exec_cmd: RUNTIME_PREFIX on some POSIX systems
Date: Mon, 20 Nov 2017 16:58:05 -0500 [thread overview]
Message-ID: <20171120215805.16994-1-dnj@google.com> (raw)
In-Reply-To: <87lgj0wtr9.fsf@evledraar.booking.com>
On Mon, 20 Nov 2017 22:00:10, Ævar Arnfjörð Bjarmason replied:
> [...]
Thanks for responding. I'll readily confess that PERL and the PERL
ecosystem are not areas I'm very familiar with, so I'm really grateful
for your feedback here.
> You need to bust the perl/PM.stamp cache as a function of your
> RUNTIME_PREFIX_PERL variable (or NO_PERL_MAKEMAKER).
Good catch, I'll add that to the next version of the patch.
> Other than that, is this whole NO_PERL_MAKEMAKER workaround just because
> you couldn't figure out what the target RELPERLPATH is in
> $prefix/$RELPERLPATH, which in this case is share/perl/5.26.1 ?
Sort of. I actually had a version set hacked MakeMaker's $INSTALLSITELIB
(same general result) and it worked.
The executable path resolution logic that I built make assumptions about
the layout of the installation, and I ended up favoring NO_PERL_MAKEMAKER
because I could rely on its explicit and straightforward installation
logic.
I am not sure that MakeMaker adds value in a RUNTIME_PREFIX
installation, since RUNTIME_PREFIX's motivation is fundamentally portable
and my impression of MakeMaker is that much of the value that it adds is
handling system-specific PERL installation details. Given that
NO_PERL_MAKEMAKER is supported as a Git installation option, I opted to
take advantage of the explicit installation rather than rely on
MakeMaker as an intermediary.
My other motivation is that if I integrate $RELPERLPATH into the MakeMaker
installation, I'd still have to implement that behavior when
NO_PERL_MAKEMAMER is enabled so that it is compatible with
RUNTIME_PREFIX_PERL.
I'd welcome any insight on whether this is the correct way to proceed.
If we decode to go forward with NO_PERL_MAKEMAKER, I'm happy to add some
better documentation in the Makefile to detail the rationale for
forcefully enabling it.
> 1. The regex match you're doing to munge the dir could be done as a
> catdir($orig, '..', '..', 'lib'), that doesn't work as discussed
> above, but *might* be more portable. I say might because I don't know
> if the path string is always normalized to be unix-like, but if not
> this won't work e.g on Windows where it'll have \ not /.
The regex-based approach was motivated by a perceived value to
conciseness. Since a larger header code block seems to be acceptable, I
could emit "$(gitexecdir)" as a constant in the header and operate on it
at runtime. This would avoid having to calculate the correct sequence of
"../" to walk up from "$(gitexecdir)" directly in the Makefile.
> 2. You are 'use'-ing FindBin there unconditionally (use is not function
> local in perl), and implicitly assuming it loads File::Spec.
>
> Ignoring the NO_PERL_MAKEMAKER caveats above I'd suggest something
> like this:
Sounds good! I wasn't sure whether I should adhere to the one-line header
that was being used before, but I am all for whitespace if that is
acceptable.
This seems a bit much to emit from a Makefile - what do you think about
adding template files for each header in the "perl/" directory and
preprocessing them via "sed" in the Makefile?
> 3. I may be squinting at this wrong but it seems to me that between
> your v1 and v2 reading GITPERLLIB here no longer makes any sense at
> all. You used to set it in git itself, now it takes priority but
> nothing sets it, presumably you'd have some external wrapper script
> that'll set it?
$GITPERLLIB is (as far as I can tell) used for testing, so that PERL scripts
invoked by tests can find the Git support libraries. I think it is still
necessary in both RUNTIME_PREFIX_PERL and default worlds because tests run
Git out of the repository root, so relative resolution logic based on
installation paths will not work.
Thanks again!
-Dan
next prev parent reply other threads:[~2017-11-20 21:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-19 17:31 [PATCH v2 0/1] exec_cmd: RUNTIME_PREFIX on some POSIX systems Dan Jacques
2017-11-19 17:31 ` [PATCH 1/1] " Dan Jacques
2017-11-20 1:01 ` Junio C Hamano
2017-11-20 21:00 ` Ævar Arnfjörð Bjarmason
2017-11-20 21:50 ` Ævar Arnfjörð Bjarmason
2017-11-21 2:41 ` Re " Dan Jacques
2017-11-22 12:09 ` Ævar Arnfjörð Bjarmason
2017-11-22 14:27 ` Dan Jacques
2017-11-20 21:58 ` Dan Jacques [this message]
2017-11-20 22:46 ` Re(2): " Ævar Arnfjörð Bjarmason
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171120215805.16994-1-dnj@google.com \
--to=dnj@google.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).