[Toybox] more gnu nonsense: cp -n

Rob Landley rob at landley.net
Mon Apr 1 22:18:03 PDT 2024


On 4/1/24 10:31, enh via Toybox wrote:
> hadn't seen this one before...
> 
> cp: warning: behavior of -n is non-portable and may change in future;
> use --update=none instead
> 
> (consider me skeptical that a system without -n is going to have
> --update=none...)

Define non-portable? Freebsd 14 has -n, macos has -n, busybox cp has -n, and of
course toybox (and thus android) has -n.

Meanwhile:

$ ./busybox cp --update=none one two
cp: option '--update' doesn't allow an argument
root at freebsd:~ # cp --update=none one two
cp: illegal option -- -
root at freebsd:~ # cp --update=none one two
cp: illegal option -- -
$ toybox cp --update=none one two
cp: Unknown option 'update=none' (see "cp --help")

Those clowns are explicitly advocating for a LESS portable option.

This is why I'm not removing "egrep", which is a shell wrapper on my devuan
system by the way:

$ which egrep
/bin/egrep
$ cat /bin/egrep
#!/bin/sh
exec grep -E "$@"

At least THAT one is easy for distributions to keep doing regardless of gnu/stupid.

If the solution for cp -n isn't "distro patches out the stupid", then "install
busybox cp" or just "use alpine". Spurious warnings from gnu are just that:
spurious.

Rob


More information about the Toybox mailing list