git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "SZEDER Gábor" <szeder.dev@gmail.com>
Cc: git@vger.kernel.org,
	"brian m. carlson" <sandals@crustytoothpaste.net>,
	Eric Sunshine <sunshine@sunshineco.com>
Subject: Re: [PATCH v2] ci: use absolute PYTHON_PATH in the Linux jobs
Date: Thu, 23 Jul 2020 15:31:56 -0700	[thread overview]
Message-ID: <xmqqwo2toobn.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <20200723213848.30032-1-szeder.dev@gmail.com> ("SZEDER =?utf-8?Q?G=C3=A1bor=22's?= message of "Thu, 23 Jul 2020 23:38:48 +0200")

SZEDER Gábor <szeder.dev@gmail.com> writes:

> In our test suite, when 'git p4' invokes a Git command as a
> subprocesses, then it should run the 'git' binary we are testing.
> Unfortunately, this is not the case in the 'linux-clang' and
> 'linux-gcc' jobs on Travis CI, where 'git p4' runs the system
> '/usr/bin/git' instead.
>
> Travis CI's default Linux image includes 'pyenv', and all Python
> invocations that involve PATH lookup go through 'pyenv', e.g. our
> 'PYTHON_PATH=$(which python3)' sets '/opt/pyenv/shims/python3' as
> PYTHON_PATH, which in turn will invoke '/usr/bin/python3'.  Alas, the
> 'pyenv' version included in this image is buggy, and prepends the
> directory containing the Python binary to PATH even if that is a
> system directory already in PATH near the end.  Consequently, 'git p4'
> in those jobs ends up with its PATH starting with '/usr/bin', and then
> runs '/usr/bin/git'.
>
> So use the absolute paths '/usr/bin/python{2,3}' explicitly when
> setting PYTHON_PATH in those Linux jobs to avoid the PATH lookup and
> thus the bogus 'pyenv' from interfering with our 'git p4' tests.
> Don't bother with special-casing Travis CI: while this issue doesn't
> affect the corresponding Linux jobs on GitHub Actions, both CI systems
> use Ubuntu LTS-based images, so we can safely rely on these Python
> paths.

Good.  This does not need to touch pyenv but take advantage of the
fact that we know where Python 2 and 3 are.  Nice.

>
> Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
> ---
>
> Junio, I see that you picked up the first/RFC version and applied it
> on top of v2.26.2.  This patch won't work on v2.26.2, because its 'git
> p4' is not compatible with python3 yet.

Thanks.  Which means that we do not need to touch maint track (not
that we'd be merging the SHA-256 topic down to the maint track
anyway).

Will queue.

  reply	other threads:[~2020-07-23 22:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-21 16:12 [PATCH] [RFC] travis-ci: remove bogus 'pyenv' " SZEDER Gábor
2020-07-21 16:23 ` Eric Sunshine
2020-07-21 20:34 ` Junio C Hamano
2020-07-23 21:38   ` [PATCH v2] ci: use absolute PYTHON_PATH " SZEDER Gábor
2020-07-23 22:31     ` Junio C Hamano [this message]
2020-07-24 13:58       ` SZEDER Gábor
2020-07-21 22:20 ` [PATCH] [RFC] travis-ci: remove bogus 'pyenv' " brian m. carlson

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=xmqqwo2toobn.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=sandals@crustytoothpaste.net \
    --cc=sunshine@sunshineco.com \
    --cc=szeder.dev@gmail.com \
    --subject='Re: [PATCH v2] ci: use absolute PYTHON_PATH in the Linux jobs' \
    /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

Code repositories for project(s) associated with this 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).