git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Torsten Bögershausen" <tboegi@web.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Torsten Bögershausen" <tboegi@web.de>, vfr@lyx.org, git@vger.kernel.org
Subject: Re: [PATCH] t: Replace 'perl' by $PERL_PATH
Date: Wed, 20 Jun 2012 22:16:17 +0200	[thread overview]
Message-ID: <4FE22F91.1000809@web.de> (raw)
In-Reply-To: <7vk3z560i8.fsf@alter.siamese.dyndns.org>

On 06/18/2012 12:23 AM, Junio C Hamano wrote:
> Torsten Bögershausen<tboegi@web.de>  writes:
>
>>> PERL_PATH should be exported from test-lib.sh; we dot-source
>>> GIT-BUILD-OPTIONS to get its value, but it is not propagated to the
>>
>> Thanks, that works for me.
>> Do you squeeze some like that onto pu?
>>
>> @@ -493,6 +493,7 @@ GIT_ATTR_NOSYSTEM=1
>>   export PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR GIT_CONFIG_NOSYSTEM GIT_ATTR_NOSYSTEM
>>
>>   . "$GIT_BUILD_DIR"/GIT-BUILD-OPTIONS
>> +export PERL_PATH
 > I see other uses of bare "perl" that the patch forgot to convert,
 > and the worst part is that one of these uses of bare "perl" appears
 > in test-lib.sh _before_ it dot-sources GIT-BUILD-OPTIONS to pick up
 > the correct version of Perl, so the above single liner cannot be the
 > whole fix.

How do you like the following idea:
- rename t/test-lib.sh into t/test-lib.sh.sh
- Change perl into @@PERL_PATH@@ in this file
- Add the missing EXPORT PERL_PATH in test-lib.sh.sh
- Preprocess t/test-lib.sh from t/test-lib.sh.sh, as seen below

> diff --git a/Makefile b/Makefile
index 0914133..765107a 100644
--- a/Makefile
+++ b/Makefile
@@ -442,6 +442,7 @@ SCRIPT_LIB += git-rebase--interactive
  SCRIPT_LIB += git-rebase--merge
  SCRIPT_LIB += git-sh-setup
  SCRIPT_LIB += git-sh-i18n
+SCRIPT_LIB += t/test-lib.sh

  SCRIPT_PERL += git-add--interactive.perl
  SCRIPT_PERL += git-difftool.perl
@@ -2018,6 +2019,7 @@ sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
      -e 's|@@LOCALEDIR@@|$(localedir_SQ)|g' \
      -e 's/@@NO_CURL@@/$(NO_CURL)/g' \
      -e 's/@@USE_GETTEXT_SCHEME@@/$(USE_GETTEXT_SCHEME)/g' \
+    -e 's|@@PERL_PATH@@|$(PERL_PATH)|g' \
      -e $(BROKEN_PATH_FIX) \
      $@.sh >$@+
  endef

      reply	other threads:[~2012-06-20 20:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-11 19:01 [PATCH] t: Replace 'perl' by $PERL_PATH vfr
2012-06-11 19:15 ` Junio C Hamano
2012-06-12 12:34   ` Jeff King
2012-06-12 14:56     ` Junio C Hamano
2012-06-12 14:59       ` Jeff King
2012-06-12 15:36   ` Erik Faye-Lund
2012-06-12 16:08     ` Junio C Hamano
2012-06-12 16:44       ` Junio C Hamano
2012-06-12 17:05         ` Jeff King
2012-06-12 19:29         ` Vincent van Ravesteijn
2012-06-17  6:36 ` Torsten Bögershausen
2012-06-17  7:15   ` Junio C Hamano
2012-06-17  8:50     ` Torsten Bögershausen
2012-06-17 22:23       ` Junio C Hamano
2012-06-20 20:16         ` Torsten Bögershausen [this message]

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=4FE22F91.1000809@web.de \
    --to=tboegi@web.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=vfr@lyx.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).