Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Harald Nordgren via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org,  Patrick Steinhardt <ps@pks.im>,
	 Harald Nordgren <haraldnordgren@gmail.com>
Subject: Re: [PATCH v2] ci: fail the build if perforce, git-lfs, or JGit fail to install
Date: Fri, 23 Oct 2026 14:48:48 -0700	[thread overview]
Message-ID: <xmqqa4o43x6n.fsf@gitster.g> (raw)
In-Reply-To: <pull.2403.v2.git.git.1792774249888.gitgitgadget@gmail.com> (Harald Nordgren via GitGitGadget's message of "Fri, 23 Oct 2026 16:50:49 +0000")

"Harald Nordgren via GitGitGadget" <gitgitgadget@gmail.com> writes:

> 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).

> @@ -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...

> +	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

  reply	other threads:[~2026-10-23 21:48 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-12 14:38 [PATCH] ci: only warn about perforce/git-lfs/JGit on platforms that need them Harald Nordgren via GitGitGadget
2026-09-25 19:02 ` Junio C Hamano
2026-09-28 12:31 ` Patrick Steinhardt
2026-09-28 16:13   ` Harald Nordgren
2026-10-23 16:50 ` [PATCH v2] ci: fail the build if perforce, git-lfs, or JGit fail to install Harald Nordgren via GitGitGadget
2026-10-23 21:48   ` Junio C Hamano [this message]
2026-10-23 22:59     ` Harald Nordgren
2026-10-23 23:06       ` Junio C Hamano
2026-10-26  7:13   ` Patrick Steinhardt
2026-10-26  7:38     ` Harald Nordgren
2026-10-26  7:41       ` Harald Nordgren
2026-10-26  8:07         ` Patrick Steinhardt
2026-10-26  8:08           ` Harald Nordgren
2026-10-26  8:06       ` Patrick Steinhardt
2026-10-26  8:13         ` Harald Nordgren
2026-10-26  8:58           ` Patrick Steinhardt
2026-10-26  9:54 ` [PATCH v3 0/2] ci: fail the build if perforce, git-lfs " Harald Nordgren via GitGitGadget
2026-10-26  9:54   ` [PATCH v3 1/2] ci: drop quarantine removal for macos perforce binaries Harald Nordgren via GitGitGadget
2026-10-26 11:08     ` Patrick Steinhardt
2026-10-26 12:18       ` Harald Nordgren
2026-10-26 12:49       ` Harald Nordgren
2026-10-26 16:54         ` Junio C Hamano
2026-10-26  9:54   ` [PATCH v3 2/2] ci: fail the build if perforce, git-lfs, or JGit fail to install Harald Nordgren via GitGitGadget
2026-10-26 11:08     ` Patrick Steinhardt
2026-10-26 12:17       ` Harald Nordgren

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqa4o43x6n.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=haraldnordgren@gmail.com \
    --cc=ps@pks.im \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox