From: Pádraig Brady
Date: Tue, 22 Jul 2025 19:34:50 +0000 (+0100) Subject: install: with -d, use more accurate diagnostics X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a106af2d69af9477e614d50cf5c22315ef402ea;p=thirdparty%2Fcoreutils.git 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 --- 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