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

Re: [PATCH] gitweb-lib.sh: Set up PATH to use perl from /usr/bin

From
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Date
May 1, 2012, 17:03 UTC
Message-ID
<4FA0176B.50300@in.waw.pl>
In-Reply-To
<7vsjfjalx6.fsf@alter.siamese.dyndns.org>
On 05/01/2012 06:47 PM, Junio C Hamano wrote:
Show 8 quoted lines
> Zbigniew Jędrzejewski-Szmek  <zbyszek@in.waw.pl> writes:
> 
>> Hm, I see that most scripts have #!/usr/bin/perl, and only two have
>> #!env perl [1]. So in general we usally rely on using perl in /usr/bin.
> 
> The #!/usr/bin/env variants should be eradicated.  Our Makefile rewrites
> "#!.*perl" with "#!$PERL_PATH" in scripted Porcelains before installing,
> so /usr/bin/perl is the right thing to write there.
This would be trivial, as it is only two files.

But I don't see why we would use a different perl in git-am.sh: perl -ne 'BEGIN { $subject = 0 } git-am.sh: perl -M'POSIX qw(strftime)' -ne 'BEGIN { $subject = 0 } git-request-pull.sh:ref=$(git ls-remote "$url" | perl -e "$find_matching_ref" "$head" "$headrev") git-submodule.sh: perl -e ' test-sha1.sh: perl -pe 'y/\000/g/' test-sha1.sh: perl -pe 'y/\000/g/' and lot of files in t/. Shouldn't those be replaced too?

Jeff King wrote:
> The Makefile substitutes $PERL_PATH on the #!-line of each perl script
> during its "build" step (which is really just copying the file to its
> final name and running "chmod +x").

Thank you for the explanation. I never noticed this, since I don't set PERL_PATH myself.

Zbyszek
Previous: Junio C HamanoNext: Jeff King
Message 5 of 12 in “gitweb-lib.sh: Set up PATH to use perl from /usr/bin”
  1. gitweb-lib.sh: Set up PATH to use perl from /usr/binTorsten Bögershausen, May 1, 2012
  2. Zbigniew Jędrzejewski-SzmekMay 1, 2012
  3. Jeff KingMay 1, 2012
  4. Junio C HamanoMay 1, 2012
  5. Zbigniew Jędrzejewski-SzmekMay 1, 2012
  6. Jeff KingMay 1, 2012
  7. Torsten BögershausenMay 1, 2012
  8. Junio C HamanoMay 1, 2012
  9. t/gitweb-lib: use $PERL_PATH to run gitwebJeff King, May 1, 2012
  10. Consistently use perl from /usr/bin/ for scriptsZbigniew Jędrzejewski-Szmek, May 1, 2012
  11. Randal L. SchwartzMay 1, 2012
  12. Junio C HamanoMay 1, 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.