@jow is the maintainer of coreutils, so might by worthwhile to get his input
The underlying reason is of course a conflict in the installation paths by busybox applets and coreutils-apps. The conflict has been there for ages.
Busybox mostly installs into /bin but some apps like most coreutils apps do get installed into /usr/bin. That is likely in order to mimic the "real" coreutils applications. Coreutils installs apps into /usr/bin
This conflict has already been fixed for some other apps like traceroute and passwd, which have been patched from /usr/bin to /bin in Openwrt busybox.
I browsed the source code and found out the following:
There are roughly three kinds of coreutils apps duplicated in busybox:
-
apps not installed by default in busybox. opkg installing them should go ok, as the user should have explicitly changed his busybox build config to generate a conflict.
base64 chcon cksum comm expand factor false fold groups hostid install link logname nl nohup nproc od paste printenv printf realpath runcon sha1sum sha224sum sha384sum sha512sum shred shuf split stat stty sum tac timeout tty unlink users truncate unexpand who whoami
-
installed by default in busybox, but to a different path. No conflict:
cat chgrp chmod chown cp date dd echo kill ln ls mkdir mknod mktemp mv nice pwd rm rmdir sleep sync touch true uname
-
installed by default in busybox to the same path /usr/bin or /usr/sbin. Conflict:
basename cut dirname du env head id md5sum mkfifo readlink seq sort sha256sum tail tee test tr uniq uptime wc yes
conflict in /usr/sbin: chroot
Only this last group is actually interesting, as those might be fixed in busybox to enable installing corresponding coreutils into a live system or image (that has been compiled with default busybox).
Considering the last group, I feel that many of them are so simple that users really rarely do install them. Thinking from performance perspective, @stangri's example of "sort" is probably the one that will get installed due to performance (memory utilisation) reasons. But are others worthwhile to fix?
The busybox fix itself would be simple. This is the fix for sort app:
--- a/coreutils/sort.c
+++ b/coreutils/sort.c
@@ -29,7 +29,7 @@
//config: The SuSv3 sort standard is available at:
//config: http://www.opengroup.org/onlinepubs/007904975/utilities/sort.html
-//applet:IF_SORT(APPLET_NOEXEC(sort, sort, BB_DIR_USR_BIN, BB_SUID_DROP, sort))
+//applet:IF_SORT(APPLET_NOEXEC(sort, sort, BB_DIR_BIN, BB_SUID_DROP, sort))
//kbuild:lib-$(CONFIG_SORT) += sort.o