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

Re: [PATCH v2] ci: fail the build if perforce, git-lfs, or JGit fail to install

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 23, 2026, 21:48 UTC
Message-ID
<xmqqa4o43x6n.fsf@gitster.g>
In-Reply-To
<pull.2403.v2.git.git.1792774249888.gitgitgadget@gmail.com>
"Harald Nordgren via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 30 quoted lines
> From: Harald Nordgren <haraldnordgren@gmail.com>
>
> A failed install of perforce, git-lfs, or JGit was silently
> tolerated. The corresponding tests would just skip and the build
> stayed green, so a broken download could go unnoticed indefinitely.
>
> Fail the build immediately instead on the platforms that install
> these tools. The presence checks and warnings at the end of the
> script are gone too, since we already know by then that everything
> installed or the build wouldn't have gotten this far.
>
> Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
> ---
> ...
>  ci/install-dependencies.sh | 59 +++++++++++++++++---------------------
>  1 file changed, 26 insertions(+), 33 deletions(-)
>
> diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
> index d57dce5663..dad35db78b 100755
> --- a/ci/install-dependencies.sh
> +++ b/ci/install-dependencies.sh
> @@ -95,21 +95,33 @@ ubuntu-*|i386/ubuntu-*|debian-*)
>  			"$P4WHENCE/bin.linux26x86_64/p4d" \
>  			"$P4WHENCE/bin.linux26x86_64/p4" &&
>  		chmod a+x "$CUSTOM_PATH/p4d" "$CUSTOM_PATH/p4" || {
> -			rm -f "$CUSTOM_PATH/p4"
> -			rm -f "$CUSTOM_PATH/p4d"
> +			echo >&2 "error: could not install perforce"
> +			exit 1
>  		}

We used to attempt cleaning after ourselves before giving up (and continuing), but now we explicitly die and there is no need to remove the half-installed stuff, which makes sense. The same comment for lfs and jgit (omitted from quotes).

Show 11 quoted lines
> @@ -121,9 +133,16 @@ macos-*)
>  
>  	mkdir -p "$CUSTOM_PATH"
>  	wget -q "$P4WHENCE/bin.macosx12arm64/helix-core-server.tgz" &&
> -	tar -xf helix-core-server.tgz -C "$CUSTOM_PATH" p4 p4d &&
> +	tar -xf helix-core-server.tgz -C "$CUSTOM_PATH" p4 p4d || {
> +		echo >&2 "error: could not install perforce"
> +		exit 1
> +	}
>  	sudo xattr -d com.apple.quarantine "$CUSTOM_PATH/p4" "$CUSTOM_PATH/p4d" 2>/dev/null || true
>  	rm helix-core-server.tgz

The earlier one tried to make them executable, and failed when it cannot. I wonder you want to move "|| { ... fail ... }" below the xattr line for consistency, but the command line says "we do not care if we cannot remove the attribute and will keep going", so it cannot be done without dropping "|| true" there. Hmm...

Show 19 quoted lines
> +	echo "$(tput setaf 6)Perforce Server Version$(tput sgr0)"
> +	p4d -V
> +	echo "$(tput setaf 6)Perforce Client Version$(tput sgr0)"
> +	p4 -V
>  
>  	case "$jobname" in
>  	osx-meson)
> @@ -171,30 +190,4 @@ Documentation)
>  	;;
>  esac
>  
> -if type p4d >/dev/null 2>&1 && type p4 >/dev/null 2>&1
> -then
> ...
> -	jgit version
> -else
> -	echo >&2 "::warning:: JGit wasn't installed, see above for clues why"
> -fi
> -

And it is very nice to see these all go, as we have done the reporting all very close to where they are installed.

>  end_group "Install dependencies"
>
> base-commit: 7e34d8174dcda3435d1404c9a30bef46afe6c13e
Previous: Harald Nordgren via GitGitGadgetNext: Harald Nordgren
Message 6 of 29 in “ci: only warn about perforce/git-lfs/JGit on platforms that need them”
  1. ci: only warn about perforce/git-lfs/JGit on platforms that need themHarald Nordgren via GitGitGadget, Sep 12, 2026
  2. Junio C HamanoSep 25, 2026
  3. Patrick SteinhardtSep 28, 2026
  4. Harald NordgrenSep 28, 2026
  5. ci: fail the build if perforce, git-lfs, or JGit fail to installHarald Nordgren via GitGitGadget, Oct 23, 2026
  6. Junio C HamanoOct 23, 2026
  7. Harald NordgrenOct 23, 2026
  8. Junio C HamanoOct 23, 2026
  9. Patrick SteinhardtOct 26, 2026
  10. Harald NordgrenOct 26, 2026
  11. Harald NordgrenOct 26, 2026
  12. Patrick SteinhardtOct 26, 2026
  13. Harald NordgrenOct 26, 2026
  14. Patrick SteinhardtOct 26, 2026
  15. Harald NordgrenOct 26, 2026
  16. Patrick SteinhardtOct 26, 2026
  17. 0/2 ci: fail the build if perforce, git-lfs or JGit fail to installHarald Nordgren via GitGitGadget, Oct 26, 2026
  18. 1/2 ci: drop quarantine removal for macos perforce binariesHarald Nordgren via GitGitGadget, Oct 26, 2026
  19. Patrick SteinhardtOct 26, 2026
  20. Harald NordgrenOct 26, 2026
  21. Harald NordgrenOct 26, 2026
  22. Junio C HamanoOct 26, 2026
  23. 2/2 ci: fail the build if perforce, git-lfs, or JGit fail to installHarald Nordgren via GitGitGadget, Oct 26, 2026
  24. Patrick SteinhardtOct 26, 2026
  25. Harald NordgrenOct 26, 2026
  26. 0/2 ci: fail the build if perforce, git-lfs or JGit fail to installHarald Nordgren via GitGitGadget, Oct 27, 2026
  27. 1/2 ci: drop quarantine removal for macos perforce binariesHarald Nordgren via GitGitGadget, Oct 27, 2026
  28. 2/2 ci: fail the build if perforce, git-lfs, or JGit fail to installHarald Nordgren via GitGitGadget, Oct 27, 2026
  29. Patrick SteinhardtOct 27, 2026

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.