summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Stagner <ask+git@howdoi.land>2026-02-06 22:27:03 -0600
committerJunio C Hamano <gitster@pobox.com>2026-02-06 20:58:44 -0800
commitc591c3ceffd0a033eb228ebb54c596362ded5615 (patch)
tree14ef3d6e318af7600d42bed791f1330facb06308
parent3c6162ea5c137fb90d100865162f460af9f53a0a (diff)
downloadgit-c591c3ceffd0a033eb228ebb54c596362ded5615.tar.gz
git-c591c3ceffd0a033eb228ebb54c596362ded5615.zip
ci: ubuntu: use GNU coreutils for dirname
The uutils version of `dirname` has output that is inconsistent with GNU coreutils. Prefer the GNU implementation of this command. Signed-off-by: Colin Stagner <ask+git@howdoi.land> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xci/install-dependencies.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
index 6ee8216a05..c55441d9df 100755
--- a/ci/install-dependencies.sh
+++ b/ci/install-dependencies.sh
@@ -76,6 +76,17 @@ ubuntu-*|i386/ubuntu-*|debian-*)
sudo update-alternatives --set sudo /usr/bin/sudo.ws
fi
+ # on uutils v0.2.2 from rust-coreutils,
+ # dirname "foo/."
+ # outputs "." instead of "foo" like it should.
+ # Use GNU coreutils to provide dirname instead.
+ #
+ # See <https://github.com/uutils/coreutils/issues/10508>.
+ if test -x /usr/bin/gnudirname
+ then
+ ln -sfT /usr/bin/gnudirname /usr/bin/dirname
+ fi
+
case "$distro" in
ubuntu-*)
mkdir --parents "$CUSTOM_PATH"