Some parts of a keg's tree are not subject to the cleaner, and sometimes
we still want to remove things in directories marked skip_clean; this
allows us that freedom.
If 'lib' is marked skip_clean, we still want to avoid linking the
charset.alias file into the top of the tree. The same needs to be done
for the locale.alias file in share/locale.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This file is installed by a number of packages, but it really shouldn't
be. It is meant to be updated by packages that use it, but this is
broken (1) by software that doesn't do this correctly and (2) by the
symlink being overwritten by Homebrew's linking code.
It's presence can cause issues with tools that use libiconv/gettext.
Instead let's follow MacPorts' example and just remove it during the
clean stage.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
If HOMEBREW_KEEP_INFO environment variable is set:
- Do not symlink the info directory file (aka 'share/info/dir')
otherwise it gets overwritten by next installed brew.
- Install an entry in the directory for each linked info file when the
brew is linked.
- Uninstall the entry when the brew is unlinked.
ClosesHomebrew/homebrew#9700.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
The advertised default is that anything in share/info is removed unless
the user sets HOMEBREW_KEEP_INFO, but we've actually been installing the
files *unless* the variable is set. To illustrate:
$ unset HOMEBREW_KEEP_INFO
$ brew install -v wdiff
[...]
ln /usr/local/share/locale/af/LC_MESSAGES/wdiff-gnulib.mo
ln /usr/local/share/info/wdiff.info
ln /usr/local/share/info/dir
==> Summary
[...]
$ HOMEBREW_KEEP_INFO=1 brew install -v wdiff
ln /usr/local/share/locale/af/LC_MESSAGES/wdiff-gnulib.mo
==> Summary
[...]
Obviously not what we wanted.
ClosesHomebrew/homebrew#7989.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
The code was sucking. To the extent that maintenance was hard. It's a lot
easier to work with code that is sensibly split at sensible boundaries. So
now it is more like that.
But the refactor is minimal. Because we don't want you to have more merge
hell than absolutely necessary.
If you merge you will need to pay attention to brew.h.rb (as it is deleted)
and bin/brew (as command logic is gone). It will be painful, but you will just
have to help git out by moving any changes around manually.
Note compatibility.rb. It ensures that any function renames or removals don't
break anything. We're pretty serious about backwards compatibility. And that's
because we encourage you to hack around with the innards. And we couldn't do
that if we would then just make stuff disappear behind your back.