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>
Colin Stagner committed
Feb 6, 2026 at 22:27 UTC
c591c3ceffd0a033eb228ebb54c596362ded5615
1 file changed
+11
ci/install-dependencies.sh
+11
@@ -76,6 +76,17 @@ ubuntu-*|i386/ubuntu-*|debian-*)
76
sudo update-alternatives --set sudo /usr/bin/sudo.ws
77
fi
78
79
+ # on uutils v0.2.2 from rust-coreutils,
80
+ # dirname "foo/."
81
+ # outputs "." instead of "foo" like it should.
82
+ # Use GNU coreutils to provide dirname instead.
83
+ #
84
+ # See <https://github.com/uutils/coreutils/issues/10508>.
85
+ if test -x /usr/bin/gnudirname
86
+ then
87
+ ln -sfT /usr/bin/gnudirname /usr/bin/dirname
88
+ fi
89
+
90
case "$distro" in
91
ubuntu-*)
92
mkdir --parents "$CUSTOM_PATH"