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

Re: [PATCH] t: Replace 'perl' by $PERL_PATH

From
Torsten Bögershausen <tboegi@web.de>
Date
Jun 20, 2012, 20:16 UTC
Message-ID
<4FE22F91.1000809@web.de>
In-Reply-To
<7vk3z560i8.fsf@alter.siamese.dyndns.org>
On 06/18/2012 12:23 AM, Junio C Hamano wrote:
Show 13 quoted lines
> 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
Previous: Junio C Hamano
Message 15 of 15 in “t: Replace 'perl' by $PERL_PATH”
  1. t: Replace 'perl' by $PERL_PATHvfr@lyx.org, Jun 11, 2012
  2. Junio C HamanoJun 11, 2012
  3. Jeff KingJun 12, 2012
  4. Junio C HamanoJun 12, 2012
  5. Jeff KingJun 12, 2012
  6. Erik Faye-LundJun 12, 2012
  7. Junio C HamanoJun 12, 2012
  8. Junio C HamanoJun 12, 2012
  9. Jeff KingJun 12, 2012
  10. Vincent van RavesteijnJun 12, 2012
  11. Torsten BögershausenJun 17, 2012
  12. Junio C HamanoJun 17, 2012
  13. Torsten BögershausenJun 17, 2012
  14. Junio C HamanoJun 17, 2012
  15. Torsten BögershausenJun 20, 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.