From: "Harald Nordgren via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Harald Nordgren <haraldnordgren@gmail.com>,
Harald Nordgren <haraldnordgren@gmail.com>
Subject: [PATCH] ci: only warn about perforce/git-lfs/JGit on platforms that need them
Date: Sat, 12 Sep 2026 14:38:02 +0000 [thread overview]
Message-ID: <pull.2403.git.git.1789223882471.gitgitgadget@gmail.com> (raw)
From: Harald Nordgren <haraldnordgren@gmail.com>
perforce, git-lfs, and JGit test git's own interop code, not anything
platform-specific, so installing them once on ubuntu-* (all three)
and macos-* (perforce) is enough coverage. debian, i386/ubuntu,
alpine, fedora and almalinux never install them, yet the presence
check at the end of the script warned on all of them anyway.
Scope each check to the platforms that attempt the install, so a
warning means one actually failed.
Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
---
ci: only warn about perforce/git-lfs/JGit on platforms that need them
Only warn about a missing perforce/git-lfs/JGit install on the platforms
that actually need and attempt them (ubuntu-*, plus macOS for perforce),
since every other platform never installs them and was warning
regardless.
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2403%2FHaraldNordgren%2Fci-scope-optional-tool-warnings-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2403/HaraldNordgren/ci-scope-optional-tool-warnings-v1
Pull-Request: https://github.com/git/git/pull/2403
ci/install-dependencies.sh | 54 ++++++++++++++++++++++----------------
1 file changed, 31 insertions(+), 23 deletions(-)
diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
index 2f61fbb07c..a68cec64b4 100755
--- a/ci/install-dependencies.sh
+++ b/ci/install-dependencies.sh
@@ -171,30 +171,38 @@ Documentation)
;;
esac
-if type p4d >/dev/null 2>&1 && type p4 >/dev/null 2>&1
-then
- echo "$(tput setaf 6)Perforce Server Version$(tput sgr0)"
- p4d -V
- echo "$(tput setaf 6)Perforce Client Version$(tput sgr0)"
- p4 -V
-else
- echo >&2 "::warning:: perforce wasn't installed, see above for clues why"
-fi
+case "$distro" in
+ubuntu-*|macos-*)
+ if type p4d >/dev/null 2>&1 && type p4 >/dev/null 2>&1
+ then
+ echo "$(tput setaf 6)Perforce Server Version$(tput sgr0)"
+ p4d -V
+ echo "$(tput setaf 6)Perforce Client Version$(tput sgr0)"
+ p4 -V
+ else
+ echo >&2 "::warning:: perforce wasn't installed, see above for clues why"
+ fi
+ ;;
+esac
-if type git-lfs >/dev/null 2>&1
-then
- echo "$(tput setaf 6)Git-LFS Version$(tput sgr0)"
- git-lfs version
-else
- echo >&2 "::warning:: git-lfs wasn't installed, see above for clues why"
-fi
+case "$distro" in
+ubuntu-*)
+ if type git-lfs >/dev/null 2>&1
+ then
+ echo "$(tput setaf 6)Git-LFS Version$(tput sgr0)"
+ git-lfs version
+ else
+ echo >&2 "::warning:: git-lfs wasn't installed, see above for clues why"
+ fi
-if type jgit >/dev/null 2>&1
-then
- echo "$(tput setaf 6)JGit Version$(tput sgr0)"
- jgit version
-else
- echo >&2 "::warning:: JGit wasn't installed, see above for clues why"
-fi
+ if type jgit >/dev/null 2>&1
+ then
+ echo "$(tput setaf 6)JGit Version$(tput sgr0)"
+ jgit version
+ else
+ echo >&2 "::warning:: JGit wasn't installed, see above for clues why"
+ fi
+ ;;
+esac
end_group "Install dependencies"
base-commit: 47ce80527c56f462cb97db4ca8125342204d3783
--
gitgitgadget
reply other threads:[~2026-09-12 14:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=pull.2403.git.git.1789223882471.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=haraldnordgren@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.