-
-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
man-db: symlink commands without 'g' prefix into libexec/bin #36769
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @lembacon!
Ping @maxim-belkin |
I guess I'm not sure why we need to do this. @lembacon, what is the goal of installing symlinks in |
So people can add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add caveats.
def caveats; <<~EOS
Commands also provided by macOS have been installed with the prefix "g".
If you need to use these commands with their normal names, you
can add a "gnubin" directory to your PATH from your bashrc like:
PATH="#{opt_libexec}/gnubin:$PATH"
EOS
end
I'm confused. Why are we adding |
The default name is |
Small correction: the default name is
|
Formula/man-db.rb
Outdated
# Symlink commands without 'g' prefix into libexec/gnubin and | ||
# man pages into libexec/gnuman | ||
%w[apropos catman lexgrog man mandb manpath whatis].each do |cmd| | ||
(libexec/"gnubin").install_symlink bin/"g#{cmd}" => cmd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
man-db
is not gnu
. Having gnu
prefix is deceptive.
Formula/man-db.rb
Outdated
(libexec/"gnubin").install_symlink bin/"g#{cmd}" => cmd | ||
end | ||
%w[accessdb].each do |cmd| | ||
(libexec/"gnusbin").install_symlink sbin/"g#{cmd}" => cmd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- This is a single file, so no need for 3 lines of code.
- Same as above: using
gnu
is deceptive. How aboutnongnu
?
I left couple of comments but they apply to other places in the PR as well -- I just didn't want to flood the PR with repetitive text. |
The approach taken by @lembacon here is the same as in the GNU tools. homebrew-core/Formula/coreutils.rb Lines 81 to 84 in cb29320
and also findutils modules grep ed monkeysphere cockroach gawk inetutils gnu-time flex gnu-which emacs make gnu-tar gnu-indent gnu-sed gnu-units |
I agree that |
I suggest there should be some guidelines about when to symlink binaries:
I don't know what else is out there, but we already saw some back and forth in #36494 and I believe that was partially because of the lack of a clear plan. |
Anything that doesn't shadow a macOS |
abbb77e
to
b291177
Compare
@sjackman @maxim-belkin I've made some changes,
|
Actually, since it's solely a user binary, what could be the advantage of symlinks over an alias in the user's profile? I find aliasing more intuitive and transparent than exploiting the libexec folder for this use, |
Thanks, @lembacon ! @CL-Jeremy Most users use only |
Noticed that
😮 |
brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingbrew install <formula>
)?Make
man-db
consistent with other formulae prefixed byg
.