373 Commits

Author SHA1 Message Date
Jack Nagel
3b68723fa8 Make FormulaInstaller setup more readable 2014-03-13 15:59:54 -05:00
Jack Nagel
ce5e2aa65c Make debug an installer mode 2014-03-13 15:59:54 -05:00
Jack Nagel
4d02849d43 Make verbose an installer mode 2014-03-13 15:59:54 -05:00
Jack Nagel
908d2ba792 Make interactive an installer mode 2014-03-13 15:59:53 -05:00
Jack Nagel
a96c1a2afc Make force_bottle an explicit installer mode 2014-03-10 14:56:02 -05:00
Jack Nagel
97dd5f61c4 install: explicitly pass used options to the installer 2014-03-10 14:56:02 -05:00
Jack Nagel
a911dd5066 Make build_from_source an explicit installer mode 2014-03-10 14:56:02 -05:00
Jack Nagel
42e60f7c59 Make build_bottle an explicit installer mode 2014-03-10 14:56:01 -05:00
Jack Nagel
1ab5943fb2 Let commands decide what mode the installer should use 2014-03-04 14:06:25 -06:00
Jack Nagel
4c0db19538 Extract installer setup to prelude method 2014-03-04 14:06:25 -06:00
Jack Nagel
c534b1907d Revert "Let commands decide what mode the installer should use"
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.
2014-03-02 09:01:50 -06:00
Jack Nagel
ffbe5bf22c Let commands decide what mode the installer should use 2014-03-02 00:21:13 -06:00
Jack Nagel
26785dbe5d Use Formula.path 2014-02-28 16:51:15 -06:00
Adam Vandenberg
ae69fa25cc Revert "Recognize --head as an alias for --HEAD"
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.
2014-02-11 21:25:26 -08:00
Misty De Meo
b1c0380b7b Recognize --head as an alias for --HEAD
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.

Closes Homebrew/homebrew#26555.
2014-02-09 15:44:49 -08:00
Mike McQuaid
4dd6f0cb4c install, update: AlreadyTappedError never raised. 2014-01-03 21:57:06 +00:00
Jack Nagel
6c04ccfb3b Remove unused variables 2013-12-12 15:42:35 -06:00
Jack Nagel
4443a9f2e1 Emit deprecation warning for --use-{gcc,llvm,clang}
Closes Homebrew/homebrew#24864.
2013-12-02 01:17:32 -06:00
Mike McQuaid
b0bf181788 install: search when formula isn't found. 2013-10-31 17:20:00 -07:00
Mike McQuaid
ce8123badd install: print osx-gcc-installer doctor warning. 2013-10-30 11:28:37 -07:00
Mike McQuaid
98b28f5ac3 Different regex for user/tap/formula and user/tap.
Closes Homebrew/homebrew#23430.
2013-10-22 11:58:40 +01:00
Mike McQuaid
b7000aec37 install: silently ignore already tapped taps. 2013-10-21 20:16:57 +01:00
Mike McQuaid
0055e4dc5f install: fix trying to tap local bottles. 2013-10-21 19:49:09 +01:00
Mike McQuaid
c71492561f install: tap if full tap formula format given.
Closes Homebrew/homebrew#23411.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-10-21 18:53:24 +01:00
Xiyue Deng
896173a999 Revert Library/Homebrew/cmd/install.rb to 4b320eec.
* Fix problem when install exception got swallow and reinstall thinks it
  succeeded.
2013-09-05 12:24:21 -07:00
Samuel John
6ae2e872d3 reinstall cleanup 2013-09-05 14:59:33 +02:00
Xiyue Deng
8aae1dac7b Make reinstall transaction safe.
* 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.

Closes Homebrew/homebrew#22190.

Signed-off-by: Samuel John <github@SamuelJohn.de>
2013-09-05 14:02:29 +02:00
Jack Nagel
50db35e5d3 Use Hardware::CPU module 2013-06-14 10:34:17 -05:00
Jack Nagel
2045217a68 install: remove overcautious array manipulation 2013-06-12 09:02:20 -05:00
Adam Vandenberg
4c9ac19e87 Consolidate sudo checks.
Closes Homebrew/homebrew#20318.
2013-06-08 20:44:56 -07:00
Jack Nagel
3755b33a97 Refactor Xcode/CLT version checks 2013-05-22 22:30:38 -05:00
Jack Nagel
12932a51b3 Don't error out when a package is already installed
Fixes Homebrew/homebrew#17010.
2013-04-03 18:27:28 -05:00
Jack Nagel
5c799ef8c8 Don't attempt installation multiple times
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.

Fixes Homebrew/homebrew#16957.
2013-01-10 16:46:54 -06:00
Misty De Meo
1bce10ad6c Replace sceaga/homebrew with mistydemeo/tigerbrew
@sceaga has discontinued his homebrew fork, so tigerbrew is now PPC/
Tiger users' best bet.
2012-12-27 21:55:15 -04:00
Jack Nagel
3dcce70a6a Better reporting for MacPorts/Fink installations
closes Homebrew/homebrew#15853.
2012-12-17 17:18:22 -06:00
Adam Vandenberg
5e212a76e3 Error out on lowercase --head parameter to install.
Fixes Homebrew/homebrew#14815.
2012-11-01 08:08:40 -07:00
Max Howell
b98c4792d0 Doctor check for unlicensed Xcode
Checking the license text is probably the most future proofed method. Though for future reference other possible methods are listed in the below ticket.

Closes Homebrew/homebrew#14558.
2012-08-31 10:22:11 -04:00
Adam Vandenberg
bd1a7e2690 remove trailing whitespace 2012-08-10 07:23:48 -07:00
Max Howell
45b84df1bd Be more verbose when users insist on being sudoers
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.
2012-08-10 09:33:44 -04:00
Brandon Black
bcde6432f3 Fix issues with writable? detection in brew doctor
Closes Homebrew/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 :/
2012-08-06 22:02:38 -04:00
Max Howell
0152b34839 Don't blacklist tapped-dupes
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.

Fixes Homebrew/homebrew#13234.
2012-08-06 14:22:22 -04:00
Mike McQuaid
fe969c21ad Add ofail command and fix bottle command output. 2012-04-30 21:38:08 +08:00
Mike McQuaid
0cbdeeaa3c Exit with bad exit code on command failures. 2012-03-29 18:44:37 +11:00
Jack Nagel
fa837edcbb Update Xcode version checks
Closes Homebrew/homebrew#11044.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-20 19:06:59 -05:00
Mike McQuaid
cd13553d59 Remove bad exit status; need to fix another way. 2012-03-10 08:18:42 +13:00
Mike McQuaid
5f1a9098c9 Add better Unix exit codes.
Closes Homebrew/homebrew#10809.
2012-03-09 19:16:33 +13:00
Max Howell
76aa0a62f3 Stop supporting `brew install --force'
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.
2012-03-07 12:33:47 +00:00
Max Howell
3a58b8141b Warn, don't advertise with a status header 2012-02-21 12:45:20 +00:00
Max Howell
2431c00c92 Move this code into FormulaInstaller
The correct location for it IMO. Also added warning for the user.
2012-02-21 11:40:06 +00:00
Adam Vandenberg
be250b4d05 don't quit if already installed 2012-02-19 14:07:42 -08:00