[Toybox] Behavior difference between toybox and ubuntu?

Rob Landley rob at landley.net
Sun Apr 8 19:39:18 PDT 2018


On 04/08/2018 05:00 PM, Rob Landley wrote:
> And lo:
> 
>   $ ln -s link link
>   $ ln -sf / link
>   ln: failed to access ‘link’: Too many levels of symbolic links
>   $ ./ln -sf / link
>   $ ls -l link
>   lrwxrwxrwx 1 landley landley 1 Apr  8 16:55 link -> /
> 
> I.E. When the destination is a symlink, ubuntu ln -sf tries to follow it and
> dies if it can't, but toybox deletes it if the symlink() call fails (for any
> reason) and tries again, which works.
> 
> I _think_ toybox is right here? But it's causing "make test_readlink" to fail
> when used with the ubuntu host $PATH instead of a toybox host $PATH. :P

Speaking of "I think toybox is right", "readlink -m /bin/ls/subdir" should
produce an error, not pretend that mkdir -p /bin/ls/subdir would create that path.

It would be so nice if there was a viable standards body to bounce this off of,
but posix and lsb are both dysfunctional at the moment. :(

Rob



More information about the Toybox mailing list