It is fucking amazing how much shit breaks if CWD is invalid. Fucking amazing.
Also fuck you dumb user who can't figure out what "No such file or directory - getcwd" means so you force me to waste half an hour fixing it for you.
A common source of compile error, lets tell the user straight away.
Removed relevant documentation from the installation instructions as a consequence.
Because we should do as little modification to the system as possible.
Even though /usr/local doesn't exist on a virgin OS X, many tools create it, and some of them expect /usr/local to be root owned for security reasons.
This modification fixes Airfoil on systems where it is installed.
The result of this is we can no longer create new directories in the HOMEBREW_PREFIX unless we check and prompt for sudo first when required.
When other packages install gdk-pixbuf modules, they get installed into
the gdk-pixbuf keg. To avoid this, we explicitly create the top level
lib directories for gdk-pixbuf and hack the pkgconfig file to point at
the top-level directories instead of the keg.
This results in other packages installing modules into the top-level
directory and as such they are "lost" and treated as unbrewed files, but
that is still better than losing them during upgrades of gdk-pixbuf
itself.
If we had a post-link hook, we could keep everything confined to its own
keg, linked into the top-level modules directory, and then run
gdk-pixbuf-query-loaders --update-cache
ourselves. In the abscence of that, I think this is the best compromise.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
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.
If it exists, ARGV.kegs will return the Formula.prefix keg for each rack examined.
So for ARGV=[wget, foo] and the following Cellar (wget/1.11, wget/1.12, foo/1.0) you'll get [wget/1.12, foo/1.0] from ARGV.kegs provided 1.12 is the formula version of wget.