-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more general BSD-friendly changes #1139
base: master
Are you sure you want to change the base?
Conversation
The BSD version of find(1) when ported to Linux needs its arguments to be preceeded with "--". This commit adds this.
The BSD version of find(1) ported to Linux needs the "--" argument appended after the command name. This commit adds this.
You're right, but it's even worse than I expected. The BSD version of getopt follows POSIX semantics more closely than the GNU getopt, and the libc change/regression was only seen after porting to glibc. The people who maintain this version of the BSD utils, https://github.com/chimera-linux, use musl libc which possibly already follows the POSIX behavior. setting POSIXLY_CORRECT="1" environment variable fixes this behavior. Is it possible then that etc-update and dispatch-conf (or portage as a whole) set POSIXLY_CORRECT when using find, or would you rather leave it up to the user? I am thinking in terms of a potential app-alternatives/coreutils here. |
I would say that this BSD find should be patched to work properly with glibc without requiring callers to set POSIXLY_CORRECT in the environment. |
I ended up doing this in the gentoo repo I maintain for chimerautils. It sets POSIXLY_CORRECT to 1 internally for find, which doesn't leak out into the user's environment. |
Portage is a package manager that allows the user the most choice on how to customize their system. Some users may want to use Portage in an environment where the GNU coreutils are not fully present or are not present at all. This patch allows for support for the linux version of the BSD find(1) and the BSD-native command to be used with etc-update and dispatch-conf.