GNU bug report logs - #64604
readlink exit booelan value bug

Previous Next

Package: coreutils;

Reported by: Budi <budikusasi <at> gmail.com>

Date: Fri, 14 Jul 2023 02:39:02 UTC

Severity: normal

Tags: notabug

Merged with 64603

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 64604 in the body.
You can then email your comments to 64604 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#64604; Package coreutils. (Fri, 14 Jul 2023 02:39:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Budi <budikusasi <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Fri, 14 Jul 2023 02:39:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Budi <budikusasi <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: readlink exit booelan value bug
Date: Fri, 14 Jul 2023 09:38:06 +0700
EDIT ABOVE MAIL TO HAVE TITILE

readlink exit value is TRUE as it actually must be FALSE at first
depth dir. with -f or -e option e.g. in /tmp dir:


/tmp$ readlink -f ./KERNEL-linux-6.3.9  && echo SUCCEEDS FIND IT
/tmp/KERNEL-linux-6.3.9
SUCCEEDS FIND IT

but correct at deeper depth:

/tmp$ readlink -f ./KERNEL-linux-6.3.9/fs  && echo SUCCEEDS FIND IT



look it up, no KERNEL-linux-6.3.9 dir.:

/tmp$ ls -Apv
.ICE-unix/                      opera/
.X11-unix/                      ssh-Xbe0jzj/  .xfsm-ICE-1BY671
.org.chromium.IfJAAT/   dbus-QZsDmoWAoc

On 7/14/23, Budi <budikusasi <at> gmail.com> wrote:
> readlink exit value is TRUE as it actually must be FALSE at first
> depth dir. with -f or -e option e.g. in /tmp dir:
>
>
> /tmp$ readlink -f ./KERNEL-linux-6.3.9  && echo SUCCEEDS FIND IT
> /tmp/KERNEL-linux-6.3.9
> SUCCEEDS FIND IT
>
> but correct at deeper depth:
>
> /tmp$ readlink -f ./KERNEL-linux-6.3.9/fs  && echo SUCCEEDS FIND IT
>
>
>
> look it up, no KERNEL-linux-6.3.9 dir.:
>
> /tmp$ ls -Apv
> .ICE-unix/                      opera/
> .X11-unix/                      ssh-Xbe0jzj/  .xfsm-ICE-1BY671
> .org.chromium.IfJAAT/   dbus-QZsDmoWAoc
>




Merged 64603 64604. Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Fri, 14 Jul 2023 02:52:02 GMT) Full text and rfc822 format available.

Added tag(s) notabug. Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Fri, 14 Jul 2023 02:55:02 GMT) Full text and rfc822 format available.

Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Fri, 14 Jul 2023 02:55:03 GMT) Full text and rfc822 format available.

Notification sent to Budi <budikusasi <at> gmail.com>:
bug acknowledged by developer. (Fri, 14 Jul 2023 02:55:03 GMT) Full text and rfc822 format available.

Message #14 received at 64604-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Budi <budikusasi <at> gmail.com>, 64604-done <at> debbugs.gnu.org
Subject: Re: bug#64604: readlink exit booelan value bug
Date: Thu, 13 Jul 2023 19:54:09 -0700
On 2023-07-13 19:38, Budi wrote:
> /tmp$ readlink -f ./KERNEL-linux-6.3.9  && echo SUCCEEDS FIND IT
> /tmp/KERNEL-linux-6.3.9
> SUCCEEDS FIND IT
> 
> but correct at deeper depth:
> 
> /tmp$ readlink -f ./KERNEL-linux-6.3.9/fs  && echo SUCCEEDS FIND IT
> 
> 
> 
> look it up, no KERNEL-linux-6.3.9 dir.:

That's not a bug. The documentation for -f says that the last component 
need not exist. Sounds like you want -e.




Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Fri, 14 Jul 2023 02:55:03 GMT) Full text and rfc822 format available.

Notification sent to Budi <budikusasi <at> gmail.com>:
bug acknowledged by developer. (Fri, 14 Jul 2023 02:55:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 11 Aug 2023 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 317 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.