I'd still like to make this change, but at least for now the initializer
requires ignore_deps to be set correctly.
This reverts commit 881a8855b944fa9bd7dfd598bb9197f79f7a13f0.
This reverts commit c32ab0a35a2dfa9b593f759ef0ae8b7af077b0b7.
There are other hard-coded uses of HEAD, in build_options for instance.
These all need to be fixed before enabling this.
Homebrew currently recognizes "--head" during the install process, but
rather than actually fetch HEAD it just nags the user to use the
correct option. Since we recognize the spelling anyway, this just
promotes the lowercase version to an official alias.
ClosesHomebrew/homebrew#26555.
* Aborting during reinstall will now restore the originally installed
keg.
- Change install code to pass on CannotInstallFormulaError exception
to caller so it can be reused in reinstall.
* Add "--force-new-install" flag to force installing a new formula.
ClosesHomebrew/homebrew#22190.
Signed-off-by: Samuel John <github@SamuelJohn.de>
When a dependency of a formula specified on the command-line is also
specified, *after* the dependent formula, installation proceeds as part
of the dependent's dependency tree and then is attempted again because
the user asked for it explicitly. This results in the installer raising
a CannotInstallFormulaError because it has already been installed.
For example:
$ brew install graphviz pkg-config
==> Installing graphviz dependency: pkg-config
...
==> Installing graphviz
...
Error: pkg-config-0.27.1 already installed
We already have a mechanism for dealing with this, but it does not kick
in early enough. Move the installation attempt check into
FormulaInstaller#check_install_sanity and catch the exception in the
appropriate places.
FixesHomebrew/homebrew#16957.
Checking the license text is probably the most future proofed method. Though for future reference other possible methods are listed in the below ticket.
ClosesHomebrew/homebrew#14558.
If you google for "Cowardly refusing to sudo brew" you get a lot of confused users who didn't read any of the Homebrew documentation and then had a hissy-fit.
ClosesHomebrew/homebrew#13689.
Signed-off-by: Max Howell <mxcl@me.com>
There are subtle distinctions between writable? and writable_real? we don't
understand precisely why we need this, but it fixes the bugs :/
If a formula is in Formula due to tapping or otherwise, don't prohibit installation.
Really we should make the blacklist *really* stuff that should be blacklisted and then if it is available still require a --force. But currently with okay stuff like vim in there, and libxml2 being both blacklisted *and* in mxcl/master, we are screwing ourselves.
TL;DR we should do some work on this component.
FixesHomebrew/homebrew#13234.
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.