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

Re: [RFC/PATCH 0/5] stop installing old libexec aliases like "git-init"

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Nov 5, 2018, 11:36 UTC
Message-ID
<87in1b7o4e.fsf@evledraar.gmail.com>
In-Reply-To
<xmqq4lcznemi.fsf@gitster-ct.c.googlers.com>
On Sat, Nov 03 2018, Junio C Hamano wrote:
Show 29 quoted lines
> Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
>
>> Although I'm on the fence with the approach in 1/5. Should this be a
>> giant getopt switch statement like that in a helper script?
>>
>> An alternative would be to write out a shell file similar to
>> GIT-BUILD-OPTIONS and source that from this thing. I don't know,
>> what do you all think?
>
> Not really.  Why do we iterate over these in a shell loop, rather
> than having make to figure them out, just like we do when we "loop
> over the source files and turn them into object files" without using
> a shell loop?  What's so special about enumerating the installation
> targets and iterating over the enumeration to perform an action on
> each of them?  I think that is the first question we should be
> asking before patch 1/5, which already assumes that it has been
> decided that it must be done with a shell loop.
>
> 	I think "first install 'git' itself, and then make these
> 	other things derived from it" should let $(MAKE) install
> 	things in parallel just like it can naturally do many things
> 	in parallel, and the dependency rule to do so should not be
> 	so bad, I suspect.
>
> This is a tangent, but I have long been wishing that somebody would
> notice that output during install and (dist)clean without V=1 is so
> different from the normal targets and do something about it, and
> hoped that that somebody finally turned out to be you doing so in
> this series X-<.

I'm all for this, but don't have enough Make skills to make it happen. Can you or someone else post a WIP patch showing how to do this?

What would the targets look like? Something that's a build target for the target file in the installation directory, so e.g. if you ran "all install" and had modified just one file (and no recursive rebuilds) you'd install just that one file?

Early on in the "install" target we install many of these programs, and then some of these for-loops re-install on top of them. Actually now that I think of this this is one of the reasons for the 2>/dev/null probably, i.e. run "install" twice and you don't want to get errors.

Anyway, regardless of how the for-loop looks like (shell or make-powered) I split this up because it was getting really hard to maintain the *inner* part of those loops. I.e. needing to specially quote everything, end lines with \ etc.

But reading on...
Show 11 quoted lines
>> I'd like to say it's ready, but I've spotted some fallout:
>
> I still have not recovered from the trauma I suffered post 1.6.0
> era, so I would rather *not* engage in a long discussion like this
> one (it is a long thread; reserve a solid hour to read it through if
> you are interested),
>
> https://public-inbox.org/git/alpine.LFD.1.10.0808261435470.3363@nehalem.linux-foundation.org/
>
> which would be needed to defend the choice, if we decide to omit
> installing the git-foo on disk in a released version.
Thanks. I'll read that later.
Show 6 quoted lines
> I personally have no objection to offer a knob that can e used to
> force installation of symlinks without falling back to other
> methods.  I think it would be ideal to do so without special casing
> symbolic links---rather, it would be ideal if it were a single knob
> INSTALL_GIT_FOO_METHOD=(symlinks|hardlinks|copies) that says "I want
> them to be installed as (symlinks|hardlinks|copies), no fallbacks".

... If you're happy to accept a patch that rips out this whole conditional fallback logic and just makes it an if/elsif/elsif for symlink/hardlink/copy this makes things a lot easier.

Show 11 quoted lines
>> Ævar Arnfjörð Bjarmason (5):
>>   Makefile: move long inline shell loops in "install" into helper
>>   Makefile: conform some of the code to our coding standards
>>   Makefile: stop hiding failures during "install"
>>   Makefile: add NO_INSTALL_SYMLINKS_FALLBACK switch
>>   Makefile: Add a NO_INSTALL_BUILTIN_EXECDIR_ALIASES flag
>>
>>  Makefile         |  65 +++++++++++--------------
>>  install_programs | 124 +++++++++++++++++++++++++++++++++++++++++++++++
>>  2 files changed, 151 insertions(+), 38 deletions(-)
>>  create mode 100755 install_programs
Previous: Junio C HamanoNext: Johannes Schindelin
Message 22 of 53 in “What's cooking in git.git (Mar 2018, #02; Tue, 6)”
  1. Junio C HamanoMar 6, 2018
  2. Johannes SchindelinMar 7, 2018
  3. Ævar Arnfjörð BjarmasonMar 8, 2018
  4. Daniel JacquesMar 8, 2018
  5. Why don't we symlink libexec/git-core/* to bin/git?Ævar Arnfjörð Bjarmason, Mar 13, 2018
  6. Junio C HamanoMar 13, 2018
  7. Randall S. BeckerMar 13, 2018
  8. 0/3 Makefile: add a INSTALL_SYMLINKS optionÆvar Arnfjörð Bjarmason, Mar 13, 2018
  9. 1/3 Makefile: fix broken bindir_relative variableÆvar Arnfjörð Bjarmason, Mar 13, 2018
  10. 3/3 Makefile: optionally symlink libexec/git-core binaries to bin/gitÆvar Arnfjörð Bjarmason, Mar 13, 2018
  11. Johannes SixtMar 14, 2018
  12. Ævar Arnfjörð BjarmasonMar 14, 2018
  13. Linus TorvaldsMar 14, 2018
  14. Johannes SchindelinMar 15, 2018
  15. Linus TorvaldsMar 15, 2018
  16. Johannes SchindelinMar 16, 2018
  17. Ævar Arnfjörð BjarmasonMar 16, 2018
  18. Johannes SchindelinMar 19, 2018
  19. Linus TorvaldsMar 19, 2018
  20. 0/5 stop installing old libexec aliases like "git-init"Ævar Arnfjörð Bjarmason, Nov 2, 2018
  21. Junio C HamanoNov 3, 2018
  22. Ævar Arnfjörð BjarmasonNov 5, 2018
  23. Johannes SchindelinNov 12, 2018
  24. Ævar Arnfjörð BjarmasonNov 16, 2018
  25. Michael HaggertyNov 16, 2018
  26. Ævar Arnfjörð BjarmasonNov 16, 2018
  27. Jeff KingNov 17, 2018
  28. Johannes SchindelinNov 22, 2018
  29. Jeff KingNov 22, 2018
  30. Johannes SchindelinNov 23, 2018
  31. 1/5 Makefile: move long inline shell loops in "install" into helperÆvar Arnfjörð Bjarmason, Nov 2, 2018
  32. Eric SunshineNov 4, 2018
  33. Johannes SchindelinNov 12, 2018
  34. Ævar Arnfjörð BjarmasonNov 12, 2018
  35. Johannes SchindelinNov 12, 2018
  36. Ævar Arnfjörð BjarmasonNov 16, 2018
  37. 2/5 Makefile: conform some of the code to our coding standardsÆvar Arnfjörð Bjarmason, Nov 2, 2018
  38. 3/5 Makefile: stop hiding failures during "install"Ævar Arnfjörð Bjarmason, Nov 2, 2018
  39. 4/5 Makefile: add NO_INSTALL_SYMLINKS_FALLBACK switchÆvar Arnfjörð Bjarmason, Nov 2, 2018
  40. Eric SunshineNov 4, 2018
  41. 5/5 Makefile: Add a NO_INSTALL_BUILTIN_EXECDIR_ALIASES flagÆvar Arnfjörð Bjarmason, Nov 2, 2018
  42. Eric SunshineNov 4, 2018
  43. Johannes SchindelinNov 12, 2018
  44. Johannes SchindelinMar 15, 2018
  45. 2/3 Makefile: add a gitexecdir_relative variableÆvar Arnfjörð Bjarmason, Mar 13, 2018
  46. Ævar Arnfjörð BjarmasonMar 14, 2018
  47. Junio C HamanoMar 14, 2018
  48. Johannes SchindelinMar 15, 2018
  49. Duy NguyenMar 16, 2018
  50. Johannes SchindelinMar 30, 2018
  51. Martin ÅgrenMar 9, 2018
  52. Duy NguyenMar 9, 2018
  53. Junio C HamanoMar 9, 2018

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.