Robert Elz wrote, on 25 Feb 2022:
>
> OK.  I have looked at the coreutils realpath man page (gnu licensing
> stupidity means I cannot look at their code), and I can see the
> possibility (subject to community agreement) of implementing
> some of the options it has.   Not all.
> 
> I'm not sure a -E option is needed, if the whole path exists it
> makes no difference, if just the last component is missing, I
> can't really imagine and BSD usage requiring an error in that case
> (and anyone who needs tgat could use -e if I implement this).

The point is it's a difference in behaviour between the two
implementations. Rather than just making it unspecified whether
the last component has to exist, it seemed to me that it would
be more useful to have -e and -E options so that users have a
way to ensure they get the same behaviour on both.

So my preferences are (in descending order):

1. POSIX adds realpath with -e and -E, and readlink without -f.
Unspecified which of -e or -E is the default.
GNU adds a no-op -E to realpath.
NetBSD/FreeBSD adds -E and a no-op -e to realpath.

2. POSIX adds readlink with -f (whose behaviour is the same for
both implementations).  No realpath.

3. POSIX adds realpath without -e and -E, and readlink without -f.
Unspecified whether realpath needs last component to exist.

I wasn't proposing any other options be included for realpath
(except perhaps -q, depending on whether it behaves the same in
both implementations).

-- 
Geoff Clare <g.cl...@opengroup.org>
The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England

  • [1003.1(2016... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [1003.1(2016... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [1003.1(2016... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [1003.1(2016... Austin Group Bug Tracker via austin-group-l at The Open Group
    • Re: [10... Robert Elz via austin-group-l at The Open Group
      • Re:... Geoff Clare via austin-group-l at The Open Group
      • Re:... Robert Elz via austin-group-l at The Open Group
        • ... Geoff Clare via austin-group-l at The Open Group
        • ... Robert Elz via austin-group-l at The Open Group
        • ... Robert Elz via austin-group-l at The Open Group
          • ... Geoff Clare via austin-group-l at The Open Group
            • ... Steffen Nurpmeso via austin-group-l at The Open Group
          • ... enh via austin-group-l at The Open Group
            • ... Steffen Nurpmeso via austin-group-l at The Open Group
          • ... Robert Elz via austin-group-l at The Open Group
            • ... enh via austin-group-l at The Open Group
              • ... Thorsten Glaser via austin-group-l at The Open Group
              • ... enh via austin-group-l at The Open Group
              • ... Thorsten Glaser via austin-group-l at The Open Group
            • ... Robert Elz via austin-group-l at The Open Group
            • ... Geoff Clare via austin-group-l at The Open Group

Reply via email to