From 5a106af2d69af9477e614d50cf5c22315ef402ea Mon Sep 17 00:00:00 2001 From: =?utf8?q?P=C3=A1draig=20Brady?= Date: Tue, 22 Jul 2025 20:34:50 +0100 Subject: [PATCH] install: with -d, use more accurate diagnostics * gnulib: Update to latest to get the fix to propagate the appropriate error message. * tests/install/basic-1.sh: Add a test case. * NEWS: Mention the bug fix. Addresses https://bugs.gnu.org/79072 --- NEWS | 5 +++++ gnulib | 2 +- tests/install/basic-1.sh | 7 +++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index f4a4739a8b..17a43b0649 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,11 @@ GNU coreutils NEWS -*- outline -*- copying to non-NFS files from NFSv4 files with trivial ACLs. [bug introduced in coreutils-9.6] + install -d now produces the correct diagnostic upon failure + to create a directory. Previously it would have produced + a confusing error about changing permissions. + [This bug was present in "the beginning".] + od --strings with -N now works correctly. Previously od might write a NUL byte after a heap buffer, or output invalid addresses. [These bugs were present in "the beginning".] diff --git a/gnulib b/gnulib index 91aacb5536..84ddfc7bd2 160000 --- a/gnulib +++ b/gnulib @@ -1 +1 @@ -Subproject commit 91aacb5536d4e768064c4f4d8d28bef6aa37e534 +Subproject commit 84ddfc7bd29853ed91cdd65c7ce818072959f974 diff --git a/tests/install/basic-1.sh b/tests/install/basic-1.sh index e311dbb9e7..fd13eb68bc 100755 --- a/tests/install/basic-1.sh +++ b/tests/install/basic-1.sh @@ -148,4 +148,11 @@ returns_ 1 ginstall . . 2>err || fail=1 printf '%s\n' "ginstall: omitting directory '.'" >exp || framework_failure_ compare exp err || fail=1 +# Ensure correct diagnostic for failing to create dir +mkdir -m 111 sub-ro || framework_failure_ +if ! mkdir sub-ro/d; then + returns_ 1 ginstall -d sub-ro/d 2>err || fail=1 + grep 'cannot create directory' err || { cat err; fail=1; } +fi + Exit $fail -- 2.47.2