git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Christian Couder <christian.couder@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git <git@vger.kernel.org>, Jeff King <peff@peff.net>,
	Dominik Mahrer <teddy@teddy.ch>,
	Christian Couder <chriscool@tuxfamily.org>
Subject: Re: [PATCH] Makefile: check that tcl/tk is installed
Date: Fri, 17 Nov 2017 16:35:23 +0100	[thread overview]
Message-ID: <CAP8UFD1hcFLMvNsXONPNbxZhTbHVzSMdRgCB9m=ZGeSTpMsYew@mail.gmail.com> (raw)
In-Reply-To: <xmqqbmk3xaxg.fsf@gitster.mtv.corp.google.com>

On Thu, Nov 16, 2017 at 2:35 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Christian Couder <christian.couder@gmail.com> writes:
>
>> To improve the current behavior when Tcl/Tk is not installed,
>> let's just check that TCLTK_PATH points to something and error
>> out right away if this is not the case.
>>
>> This should benefit people who actually want to install and use
>> git-gui or gitk as they will have to install Tcl/Tk anyway, and
>> it is better for them if they are told about installing it soon
>> in the build process, rather than if they have to debug it after
>> installing.
>
> Not objecting, but thinking aloud if this change makes sense.
>
> If you are building Git for your own use on the same box, which is
> presumably the majority of "build failed and I have no clue how to
> fix" case that needs help, if you want gui tools, you need to have
> tcl/tk installed anyway, whether you have msgfmt installed.  This
> seems to be the _only_ class of users this patch wants to cater to.
>
> I wonder if we are hurting people who are not in that category.
>
>  - To run gui tools, tcl/tk must be available at runtime, but tcl/tk
>    is not necessary in the packager's environment to produce a
>    package of Git that contains working git-gui and gitk that will
>    be used on an end-user box with tcl/tk installed, as long as the
>    packager's environment has a working msgfmt.
>
>  - To process .po files for the gui tools in the packager's
>    environment without msgfmt, tcl/tk is required.
>
> I suspect that this change will hurt those who package Git for other
> people.

Maybe a little bit, but in my opinion it should not be a big problem
for them to install Tcl/Tk and its dependencies on the build machine.

> It used to be that, as long as they have msgfmt installed, they only
> needed to _know_ what the path on the users' box to "wish" is, and
> set it to TCLTK_PATH, and if they are distro packagers, most likely
> they already have such an automated set-up working.  Now with this
> change, they are forced to install tcl/tk on their possibly headless
> box where tcl/tk is useless, and worse yet, an attempt to install it
> may bring in tons of unwanted stuff related to X that is irrelevant
> on such a headless development environment.

Yeah, but if they build gitk and git-gui, there is a significant
chance that they build other graphical software too, and that this
will require installing stuff related to X anyway.

> I doubt that this is quite a good trade-off; it feels that this
> burdens packagers a bit too much, and we may need a way to override
> this new check further.

I am ok to let packagers override this new check. For example they
could set a flag like BYPASS_TCLTK_CHECK and the new check would be:

ifndef NO_TCLTK
      ifndef BYPASS_TCLTK_CHECK
             has_tcltk := $(shell type $(TCLTK_PATH) 2>/dev/null)
             ifndef has_tcltk
$(error "Tcl/Tk is not installed ('$(TCLTK_PATH)' not found). Consider
setting NO_TCLTK or installing Tcl/Tk")
             endif
      endif
endif

Of course BYPASS_TCLTK_CHECK would have to be documented at the same
place where NO_TCLTK and TCLTK_PATH are already documented.

In general I think packagers are much more able to deal with those
kinds of problems than most regular developers who want to hack on
Git.
So asking packagers to either set NO_TCLTK or BYPASS_TCLTK_CHECK or to
install Tcl/Tk would not burden them much, especially compared to what
regular developers have to deal with these days when trying to build
Git.

> I think "If I cannot run either wish or
> msgfmt, then barf and give an error message" might at least be
> needed.  Am I misinterpreting the motivation of the patch?

I'd rather add a separate check for msgfmt than mixing the 2 issues,
because I think that unless it has been explicitly told to do so, Git
should not try to build git-gui and gitk in the first place if there
is a big chance that those tools will not work.

  reply	other threads:[~2017-11-17 15:35 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-15 12:52 [PATCH] Makefile: check that tcl/tk is installed Christian Couder
2017-11-16  1:35 ` Junio C Hamano
2017-11-17 15:35   ` Christian Couder [this message]
2017-11-17 17:42     ` Todd Zullinger
2017-11-17 22:02       ` Jeff King
2017-11-20 17:25         ` Christian Couder
2017-11-20 18:12       ` Christian Couder
  -- strict thread matches above, loose matches on Subject: below --
2017-11-20 17:15 Christian Couder
2017-11-20 17:17 ` Christian Couder
2017-11-20 19:19 ` Jonathan Nieder
2017-11-20 23:58   ` Christian Couder
2017-11-26 19:15     ` Jeff King
2017-11-26 20:57       ` Christian Couder
2017-11-27 15:31         ` Jeff King
2017-11-27  1:13       ` Junio C Hamano
2017-11-27  4:31         ` Junio C Hamano
2017-11-27  4:35           ` Jeff King
2017-11-27  5:22             ` Todd Zullinger
2017-11-27  8:24             ` Christian Couder
2017-11-27 15:27               ` Jeff King
2017-11-27 23:42                 ` Junio C Hamano
2017-11-28  4:35                   ` Junio C Hamano
2017-11-27  9:08             ` Junio C Hamano
2017-11-25 20:46 ` Christian Couder
2017-11-26  3:53   ` Junio C Hamano
2017-11-26 14:00     ` Christian Couder
2017-11-26 17:43       ` Ramsay Jones
2017-11-26 18:34         ` Christian Couder

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='CAP8UFD1hcFLMvNsXONPNbxZhTbHVzSMdRgCB9m=ZGeSTpMsYew@mail.gmail.com' \
    --to=christian.couder@gmail.com \
    --cc=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=teddy@teddy.ch \
    /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).