Ugrading to coreutils 9.5 pulls in:
https://git.savannah.gnu.org/cgit/coreutils.git/commit/src/chmod.c?id=07a69fc3ba717b879218592db685a1c79869cb28
which calls fchmodat with AT_SYMLINK_NOFOLLOW.

All the docs I can find say that symlinks don't have modes and are
always readable. With the error in place, we see things like:

chmod: changing permissions of 
'XXX/build-appliance-image/15.0.0/rootfs/home/builder/poky/scripts/esdk-tools/runqemu-gen-tapdevs':
 Function not implemented

when building build-appliance-image, which uses tools from coreutils-native.
It is only a matter of time before distros start shipping those newer tools.

I believe the correct thing to do is just return success here rather
than failure. This does fix the build failure.

Signed-off-by: Richard Purdie <richard.pur...@linuxfoundation.org>
---
 ports/unix/guts/fchmodat.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/ports/unix/guts/fchmodat.c b/ports/unix/guts/fchmodat.c
index d1ac7bb..5a31151 100644
--- a/ports/unix/guts/fchmodat.c
+++ b/ports/unix/guts/fchmodat.c
@@ -28,9 +28,8 @@
                return rc;
        }
        if (S_ISLNK(buf.st_mode)) {
-               /* we don't really support chmod of a symlink */
-               errno = ENOSYS;
-               return -1;
+               /* according to docs, "chmod on a symbolic link always succeeds 
and has no effect" */
+               return 0;
        }
        save_errno = errno;
 
-- 
2.40.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#198088): 
https://lists.openembedded.org/g/openembedded-core/message/198088
Mute This Topic: https://lists.openembedded.org/mt/105438610/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to