Note I removed some of the code that changed the URL to be that of the github.user. Because this doesn't make any sense really. We want people to reference the commit history for whatever fork of homebrew they have checked out. So this is now what it does.
Rationale: well, it should always have been like this!
However now we are opening ourselves up to more-mixed installations of formula not maintained by us, it's important that
The reason it didn't work is it doesn't use ARGV.formulae because it needs to be able to edit stuff that doesn't parse. Most other stuff already works because we are awesome.
The symlinks taps write to Formula show up in git status, but this trick prevents this. brew-(un)tap maintain a .gitignore in Formula that contains all the symlinks brew-tap creates.
We add the .gitignore to the root .gitignore and TADA! Magic.
Commit ee2c3ab ("Remove spurious libiconv dependencies") pruned all
existing "depends_on 'libiconv'" usages from Homebrew in preparation for
removing the libiconv dupe itself.
Now that is done, and we can remove and blacklist it. It can be obtained
from Homebrew-alt.
ClosesHomebrew/homebrew#10464.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Homebrew itself is found under HOMEBREW_REPOSITORY,
which *may* be the same HOMEBREW_PREFIX, but does not have
to be if you link brew into /usr/local/bin from another location.
This still isn't perfect, but it will handle hyphens in formula-names better now. A proper solution is not easy or maybe even possible unless we ban hyphens in versions AND formula names, or use a different character as a separate in downloaded cache files which we then ban from formula-name and version strings.
Refs Homebrew/homebrew#2923.
Some people seem to have an older xcode-select even after installing the CLT from inside Xcode or otherwise. So this is works for both.
Now we aren't future-proofed in case Apple change the location, but hopefully they won't, seems unlikely.
Refs Homebrew/homebrew#10743. FixesHomebrew/homebrew#10745.
Also, unlink previous keg before installing to prevent issues when existing installed brews cause build problems for the newer installed brew.
If the build fails the active keg is relinked before aborting.
Fixes #10341.
Rationale: it breaks stuff. You should not be able to install over something already installed *and* linked. brew now prompts you to unlink the existing linked keg first.
I came to fix this because I discovered that `brew install foo` works without --force provided foo's formula version is different to that which is installed and linked. I'm not sure if this was intentionally broken, but it led to at least two tickets I found where people were getting crazy issues trying to install over the top of already installed previous versions.
So I also fixed a whole category of other issues, mostly by moving error handling into FormulaInstaller. Now error's can be caught in Homebrew.install and handled on a formula-by-formula basis. I will next port this behaviour to upgrade.
Manpage updated.
The -s switch is "scrub" and removes downloads for uninstall formula which are downloads for the latest version of that formula still.
Please NOTE cache is NOT cleaned if a formula argument is provided. I couldn't be bothered. Patches welcome :)
ClosesHomebrew/homebrew#2923.
If there are multiple dependencies missing, 'brew doctor' can suggest
that you run something like:
brew install autoconf libyaml autoconf, libyaml
This commit improves that output.
ClosesHomebrew/homebrew#10720.
Signed-off-by: Max Howell <max@methylblue.com>
In fixing this I also made it so that ARGV.kegs will return the LinkedKeg if the symlink is set. Which is almost always is. This neatly avoids most multiple-kegs issues.
FixesHomebrew/homebrew#10685.
If a user has set core.autocrlf = true (which shouldn't ever be used on
OS X, but alas...), a subsequent `brew update` will check out files with
CRLF line endings. Setting core.autocrlf = false in Homebrew's repo
config will override this global setting, and let us check out files
with their in-repository line endings.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
The order of things made the check for git in the path pointless (and
was my fault); this is a better way to do it.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>