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

Re: [PATCH] [RFC] travis-ci: remove bogus 'pyenv' in the Linux jobs

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Jul 21, 2020, 16:23 UTC
Message-ID
<CAPig+cQmjgmWx3Y_8WwOORsjW0Q7M-xXKonFW1qfHYLW3mD4Fw@mail.gmail.com>
In-Reply-To
<20200721161225.6769-1-szeder.dev@gmail.com>
On Tue, Jul 21, 2020 at 12:12 PM SZEDER Gábor <szeder.dev@gmail.com> wrote:
Show 17 quoted lines
> 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 remove 'pyenv' in Travis CI's Linux jobs to prevet it from
s/prevet/prevent/
Show 10 quoted lines
> interfering with our 'git p4' tests.
>
> diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
> @@ -36,6 +36,14 @@ linux-clang|linux-gcc)
> +
> +       if test true = "$TRAVIS" &&
> +          pyenv_root=$(pyenv root)
> +       then
> +               # pyenv in Travis CI's current default (xenial) Linux
> +               # image messes up PATH for 'git p4'.

I wonder if this comment should give more precise detail about exactly how it "messes up" PATH.

> +               sudo rm -rf "$pyenv_root"
> +       fi
Previous: SZEDER GáborNext: Junio C Hamano
Message 2 of 7 in “[RFC] travis-ci: remove bogus 'pyenv' in the Linux jobs”
  1. [RFC] travis-ci: remove bogus 'pyenv' in the Linux jobsSZEDER Gábor, Jul 21, 2020
  2. Eric SunshineJul 21, 2020
  3. Junio C HamanoJul 21, 2020
  4. ci: use absolute PYTHON_PATH in the Linux jobsSZEDER Gábor, Jul 23, 2020
  5. Junio C HamanoJul 23, 2020
  6. SZEDER GáborJul 24, 2020
  7. brian m. carlsonJul 21, 2020

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.