Commit Graph
76 Commits
Author SHA1 Message Date
Jack Nagel 2959017123 Simplify implementation of ARGV.flag? and .switch? 2013-05-20 22:34:54 -05:00
Mike McQuaid 4e1d37ebdc Add environment variable to build bottles. 2013-03-01 17:49:09 +00:00
Mike McQuaid 041060e28f Support 32-bit 10.6 bottles.
Closes #17735.

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

References #16291.
2012-12-04 12:06:02 +00:00
Jack Nagel b95bcd65cd 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 a32ecf4cb3 Don't use bottles for HEAD, devel or universal. 2012-09-30 22:26:33 +01:00
Mike McQuaid e87e8a1d9a Fix building bottles from source. 2012-09-18 20:05:03 +01:00
Misty De Meo b29d1fdd5f 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 18fb888ff3 Miscellaneous bottle code cleanup. 2012-08-25 13:08:46 -07:00
Mike McQuaid 0d1c1491c4 Fix ARGV and bottles circular dependency. 2012-08-25 11:52:37 -07:00
Mike McQuaid 1b7056346b Move used_options and unused_options to ARGV. 2012-08-25 11:52:37 -07:00
Max Howell d4f034d552 Support ENV[VERBOSE] 2012-08-21 12:09:07 -04:00
Jack Nagel ec5770b590 Add ARGV.ignore_deps?
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18 19:33:39 -05:00
Max Howell 8bccae69c2 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 c3285f69b0 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 #12898.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-07-09 12:01:09 -05:00
Adam Vandenberg 9983cb9c0e Add ARGV.build_stable? 2012-06-10 14:49:56 -07:00
Jack Nagel b7a4bc644a 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 109c5eb88b Be more helpful about how to resolve this issue 2012-03-19 14:19:56 +00:00
Max Howell 14fc553ac7 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 #11050.
2012-03-19 14:17:50 +00:00
Mike McQuaid 1ac6371685 Revert "Always build bottles universally."
This reverts commit 72a477f273.
2012-03-10 19:28:46 +13:00
Mike McQuaid 72a477f273 Always build bottles universally. 2012-03-10 18:11:12 +13:00
Mike McQuaid 28b8cc7ee6 Move most bottle stuff to a bottles.rb file. 2012-03-10 18:10:40 +13:00
Max Howell 1e4c65be0b If multiple kegs, default to formula keg
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.
2012-03-07 12:33:47 +00:00
Max Howell 03b2aae0a8 Proper single character switch handling
Includes a test. So now you can do `brew cleanup -ns` and it will work.
2012-03-06 20:28:06 +00:00
Max Howell a42301ecf6 Don't require formula files for brew rm --force
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.

Fixes #10685.
2012-03-06 13:47:31 +00:00
Adam Vandenberg 25aefdd95d don't complain if args are empty 2012-02-03 21:40:14 -08:00
Mike McQuaid 89dc85b09d Add option for building bottles.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2012-01-16 21:05:00 +00:00
Adam Vandenberg 4fb16996f9 Standardize 32 bit build switch 2012-01-02 14:53:36 -08:00
Charlie Sharpsteen 132bbc1bbb Fix array concatenation in ARGV.filter_for_dependencies
Gah. This was supposed to be in the last commit, but I forgot to `--amend` it.
2011-11-27 14:44:39 -08:00
Charlie Sharpsteen bdb1d7bd33 Don't suppress --verbose while installing deps
Unless the `--quieter` flag is passed.

Closes #8723.
2011-11-27 14:37:31 -08:00
Charlie Sharpsteen f67967a002 Suppress --devel while installing dependencies
Unless the dependency is explicitly passed to `brew install --devel`.
2011-11-27 14:37:31 -08:00
Charlie Sharpsteen 3edc9d212b Re-work ARGV filtering to properly handle --HEAD
Previously, stripping arguments like `--HEAD` for dependencies failed because
that flag affects the installation prefix encoded into formula objects. The
previous implementation of `ARGV` filtering tried to contain all changes to a
single method call before the `FormulaInstaller` forks. This update spreads
things out a bit:

  - The Homebrew `ARGV` extension adds a new method, `filter_for_dependencies`
    which strips flags like `--HEAD`, yields to a block, then restores the
    original contents of ARGV.

  - The `explicitly_requested?` test, which returns true or false depending on
    if a formula object is a member of `ARGV.formulae`, is now a method of
    `Formula` objects.

  - `FormulaInstaller` objects now execute the installation of dependencies
    inside an `ARGV.filter_for_dependencies` block if the dependency was
    `explicitly_requested?`.

Fixes #8668.
Closes #7724.
2011-11-27 14:37:31 -08:00
Jack Nagel 284ecf96db Define and use ARGV.build_devel?
Often it is useful to provide a development build in addition to the
stable release or HEAD download.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-11-21 20:04:33 -08:00
Justin Hileman e0f2a274fa Allow 'brew link' to work with URL-based formulae
Closes #7373.

Signed-off-by: Max Howell <max@methylblue.com>

I added some comments.
2011-09-02 12:12:30 +01:00
Mike McQuaid 91485b7afc Don't install bottles in non-default HOMEBREW_PREFIX. 2011-07-31 11:47:14 +01:00
Mike McQuaid 18446240b6 Build from source (for now) unless on Lion.
Longer-term we'll try and use install_name_tool to fix Lion
bottles so they run fine on 10.5 and/or 10.6.

Closes #6699.
2011-07-29 18:36:47 +01:00
Mike McQuaid 3014739faa Build from source when we've options or 10.5. 2011-06-22 17:48:20 +01:00
Mike McQuaid 5f2e7aca87 Remove redeclared method. 2011-06-21 19:25:39 +01:00
Mike McQuaid e4dd52e9de Add changes to Homebrew internals for bottling. 2011-06-08 22:19:10 +01:00
Jack Nagel d3d8a916cf Fix misspelled method name: Formula.canonical_name
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-05-07 21:50:37 -07:00
Adam Vandenberg f5e8169918 Add ARGV.build_universal? 2011-04-23 08:36:38 -07:00
Max Howell 73c7a3aa1b Optimise/simplify brew help
Be more useful by being more concise. I referenced dozens of other mature commands’ usage to figure out what to do here.

Also separated out the help into its own command for consistency.
2011-03-13 12:54:30 +00:00
Adam Vandenberg 05d175d51f Use + instead of /. 2011-03-12 11:55:07 -08:00
Max Howell 9f451154ea brew deps foo bar now gives the dependency intersection
Rationale: this is more useful than the union, and you can still easily get the union by running the command twice and concatenating the result.
2011-03-12 11:55:04 -08:00
Max Howell a28e4d89c5 Formula.resolve_alias to compatability.rb 2011-03-12 11:55:03 -08:00
Max Howell 5cd927b8b5 Some Cleanup 2011-03-12 11:55:03 -08:00
Adam Vandenberg 3eb2241464 Move some exceptions 2011-03-12 11:55:03 -08:00