101 Commits

Author SHA1 Message Date
Jack Nagel
d8bdcf84af Remove obsolete guards around canonical_name return value 2014-04-05 22:03:49 -05:00
Jack Nagel
ce1f598e98 Avoid realpath where it is not necessary
Symlinks in opt and LinkedKegs point directly at a keg in the cellar, so
only resolving one symlink should suffice, and make it clear what path
we are actually interested in.
2014-04-05 12:17:19 -05:00
Jack Nagel
e0216d95af Prefer opt prefix over linked keg entry when picking active keg 2014-03-15 16:57:37 -05:00
Jack Nagel
3b3b782ba9 Add an extra sanity check 2014-03-15 16:56:51 -05:00
Jack Nagel
13f8c7ab95 Refactor ARGV.kegs 2014-03-15 16:56:40 -05:00
Jack Nagel
e236901e56 Use canonicalized name in NoSuchKegError message
cf. Homebrew/homebrew#22778.
2014-03-15 12:55:14 -05:00
Jack Nagel
0f4f7aa271 Simplify ARGV.filter_for_dependencies 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
aa5c023b76 Add ARGV.env 2014-03-13 15:59:53 -05:00
Jack Nagel
9bc8d0820e Reduce the number of things that trigger ARGV.build_from_source?
The newly generalized bottle implementation removes the need to
defensively check for --devel, --HEAD, and others in this method.
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
ce93c75f11 Remove "--fresh" option from installer
Turns out that this doesn't really work at all. `brew install` _never_
reuses options in the first place, and using this option with `brew
upgrade` results in some nasty corner cases in passing options to
dependencies.
2014-03-08 19:08:47 -06:00
Misty De Meo
e225aea902 ARGV.help?: anchor to end of string
Fixes Homebrew/homebrew#26735.
2014-02-14 16:23:38 -08:00
Mike McQuaid
eabe9dc6d0 brew: check for --help and friends in more of ARGV
Let's check for e.g. --help anywhere in the ARGV array rather than just
the first value to avoid brew upgrade --help causing problems.

Closes Homebrew/homebrew#26675.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-02-14 18:32:56 +00: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
Steven Peters
b524943226 install: add --only-dependencies option
The traditional approach to installing the dependencies of a formula is
the following:

  brew install `brew deps formula`

This approach ignores any options that are specified in the parent
formula. This pull request adds a --only-dependencies option to brew
install that installs the dependencies of a formula with optional flags,
but returns before installing the parent formula.

Closes Homebrew/homebrew#25272.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-12-19 16:43:42 -06:00
Mike McQuaid
98eac4226b Allow forcing bottle installation. 2013-09-01 12:59:01 +01:00
Misty De Meo
221bb2419f Add --cc= syntax for selecting compilers 2013-08-30 07:52:12 -07:00
Misty De Meo
c58d707158 Allow building bottles with custom architectures
This allows overriding the "oldest CPU" behaviour - for instance, to
build Intel bottles for a newer CPU than Core 2, to build a PPC bottle
with or without Altivec on the same computer, etc.
2013-08-28 20:21:06 -07:00
Adam Vandenberg
d8d6b254f7 add ARGV.value 2013-07-17 06:58:10 -07:00
Mike McQuaid
c3b7628726 ARGV: filter build-bottle from dependencies.
Fixes Homebrew/homebrew#20682.
2013-06-26 19:25:39 +01:00
Mike McQuaid
fc708b9dfb ARGV: ensure ? methods return truth values. 2013-06-22 11:13:59 +01:00
Jack Nagel
c9ce32d0f1 Simplify implementation of ARGV.flag? and .switch? 2013-05-20 22:34:54 -05:00
Mike McQuaid
af7f7d7353 Add environment variable to build bottles. 2013-03-01 17:49:09 +00:00
Mike McQuaid
8f35793020 Support 32-bit 10.6 bottles.
Closes Homebrew/homebrew#17735.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-03-01 17:49:09 +00:00
Jack Nagel
f3d3bc4368 Move option comparison into BuildOptions 2013-01-26 11:37:00 -06:00
Jack Nagel
951620f146 Restore ARGV even if an exception is raised 2013-01-10 15:57:21 -06:00
Mike McQuaid
f25e7de43b Add --homebrew-developer flag 2013-01-01 16:39:06 +00:00
Mike McQuaid
4b0e663c2c Improve bottle error messages.
On installation or creation of a bottle error out of the current
machine does not support bottles.

References Homebrew/homebrew#16291.
2012-12-04 12:06:02 +00:00
Jack Nagel
96844850b4 Return the block value in ARGV.filter_for_dependencies
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-24 17:54:16 -05:00
Mike McQuaid
b30454d3be Don't use bottles for HEAD, devel or universal. 2012-09-30 22:26:33 +01:00
Mike McQuaid
55dc5466fb Fix building bottles from source. 2012-09-18 20:05:03 +01:00
Misty De Meo
ee4c696380 ARGV: add .json
Used by brew info; may be used by other commands in the future.
2012-09-17 19:06:40 -05:00
Mike McQuaid
67f78074f9 Miscellaneous bottle code cleanup. 2012-08-25 13:08:46 -07:00
Mike McQuaid
d5b954ebd4 Fix ARGV and bottles circular dependency. 2012-08-25 11:52:37 -07:00
Mike McQuaid
ebbc3438a1 Move used_options and unused_options to ARGV. 2012-08-25 11:52:37 -07:00
Max Howell
abf55c2bcd Support ENV[VERBOSE] 2012-08-21 12:09:07 -04:00
Jack Nagel
8a21bd52d5 Add ARGV.ignore_deps?
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18 19:33:39 -05:00
Max Howell
33ec48a394 Don't require the WHOLE of Homebrew from ARGV.rb
This was slowing down every instantiation of brew significantly.

Hopefully doesn't break anything that had become accustomed to not having to require 'formula' or 'keg'.

/cc @mikemcquaid
2012-08-12 11:40:55 -04:00
Misty De Meo
f17429f842 ARGV: add .dry_run? method
Add an ARGV.dry_run? helper method for '--dry-run'/'-n' now that
'-n' is being used as a git-style dry-run in two commands.

Closes Homebrew/homebrew#12898.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-07-09 12:01:09 -05:00
Adam Vandenberg
0c14036a9a Add ARGV.build_stable? 2012-06-10 14:49:56 -07:00
Jack Nagel
9d172f85c6 ARGV: use include? for --HEAD
ARGV.build_head? will return true if the typo '-HEAD' is passed because
it uses flag? to detect the option. However, we only filter the exact
spelling of '--HEAD' in ARGV.filter_for_dependencies, and thus the HEAD
property is undesirably passed to deps during installation.

Since we never advertised '-H' as a valid short option for '--HEAD',
just use include? instead of flag?.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-10 21:53:01 -05:00
Max Howell
d145fd30b4 Be more helpful about how to resolve this issue 2012-03-19 14:19:56 +00:00
Max Howell
9ab1df5b68 If no formula but multiple kegs, advise resolution
In this case the user will simply have to delete all but one keg in order to use the command that uses ARGV.kegs.

Refs Homebrew/homebrew#11050.
2012-03-19 14:17:50 +00:00
Mike McQuaid
b86ead91ea Revert "Always build bottles universally."
This reverts commit 72a477f2734939d4c5805247588c4cdea69b5383.
2012-03-10 19:28:46 +13:00
Mike McQuaid
6d940a5bcc Always build bottles universally. 2012-03-10 18:11:12 +13:00
Mike McQuaid
552dcdc703 Move most bottle stuff to a bottles.rb file. 2012-03-10 18:10:40 +13:00