1648 Commits

Author SHA1 Message Date
Max Howell
55bd25ff4c Formula.resolve_alias to compatability.rb 2011-03-12 11:55:03 -08:00
Max Howell
768910283a Refactor the brew command into one file per command
The code was sucking. To the extent that maintenance was hard. It's a lot
easier to work with code that is sensibly split at sensible boundaries. So
now it is more like that.

But the refactor is minimal. Because we don't want you to have more merge
hell than absolutely necessary.

If you merge you will need to pay attention to brew.h.rb (as it is deleted)
and bin/brew (as command logic is gone). It will be painful, but you will just
have to help git out by moving any changes around manually.

Note compatibility.rb. It ensures that any function renames or removals don't
break anything. We're pretty serious about backwards compatibility. And that's
because we encourage you to hack around with the innards. And we couldn't do
that if we would then just make stuff disappear behind your back.
2011-03-12 11:55:02 -08:00
Adam Vandenberg
24e10826f4 Fix GithubGistFormula. 2010-12-22 17:08:53 -08:00
Adam Vandenberg
202663eb0c Fix installing from local abs. paths. 2010-11-04 13:53:03 -07:00
Adam Vandenberg
d02941e1da Quash warning.
Fixes Homebrew/homebrew#3056
2010-11-03 07:03:50 -07:00
Jamie Macey
b7fa82b28d fix warnings: ambiguous splat
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-10-30 14:50:54 -07:00
Adam Vandenberg
ea03121688 Allow installation from URLs
This allows installation like:
    brew install http://example.com/something.rb

Based on an original patch by [dwalters].

Fixes Homebrew/homebrew#160
2010-10-30 14:23:01 -07:00
Joshua Peek
a305360099 Prefer HEAD version if its installed
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-10-26 09:39:17 -07:00
Adam Vandenberg
9108e3956c Allow :build dependencies. 2010-10-12 07:13:27 -07:00
Adam Vandenberg
8eaa812711 improve std_cmake_parameters comments 2010-09-29 22:00:24 -07:00
Adam Vandenberg
bb01afce4c Move resolve_alias from ARGV to Formula
Also, call this function from a few places where the code was duplicated.
2010-09-29 21:55:44 -07:00
Adam Vandenberg
18f9969b65 Add formula name to LLVM warning 2010-09-29 21:53:05 -07:00
Adam Vandenberg
400aa9eac9 Don't allow unsupported dep types 2010-09-29 21:44:46 -07:00
Adam Vandenberg
c1e293f5a4 Let 'interactive_shell' take a formula and set ENV vars.
Pull duplicate code out of install --debug and install -i up into
'interactive_shell'.
2010-08-20 10:03:44 -07:00
Adam Vandenberg
492748bc0b Use 1.9 compat syntax. Fixes Homebrew/homebrew#2192 2010-08-16 14:14:46 -07:00
Adam Vandenberg
612ff57894 fails_with_llvm will switch to GCC 4.2 by default 2010-08-09 21:33:30 -07:00
Chris Hoffman
2f3ce485f3 Fix skip_clean :all to actually skip clean step
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-08-09 08:13:17 -07:00
Brent Fitzgerald
eca31da253 Getting rid of pesky 'warning: parenthesize argument(s) for future version'
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-08-08 08:25:35 -07:00
Adam Vandenberg
74727560ee Add 'skip_clean :all' to the DSL. 2010-08-07 18:08:52 -07:00
Adam Vandenberg
bdf245ff98 Add keg-only to DSL 2010-08-07 18:08:52 -07:00
Sam X Nguyen
1bc71794e9 added man subdirectories man2-man8
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-08-07 18:08:51 -07:00
Adam Vandenberg
1f55ba270d Sort and line up path helpers 2010-08-07 18:08:51 -07:00
Adam Vandenberg
4873062523 Deprecate using symbols to define deps 2010-08-07 18:08:51 -07:00
Adam Vandenberg
bbaac45e3e "url" now has same features as "head"
Specifically, it can accept all the VCS tag specs that head could,
making it more useful for defining stable versions that come from
VCS instead of tarballs.

A new "SoftwareSpecification" class was added to implement this.

This new class holds a "spec" for downloading a software package.
It combines the url (or head url) with the "specs" [1] that head has
been able to take.

This allows both the stable (url) and unstable (head) specification
for a software package to co-exist without stomping on each others
"specs".

[1] "specs" contain instructions on which branch/tag/revision/etc. to use
    from the source repository URL.
2010-08-07 18:08:51 -07:00
Adam Vandenberg
2ac2dbb591 Add 'aka' removal notice.
'aka' is no longer used to define aliases, but we'll keep the method
around with a warning so non-master brews have a chance to remove any
aka's; otherwise pushing the change will break private brews and we
don't want to do that.
2010-08-07 18:08:49 -07:00
Adam Vandenberg
7ff5de2ad8 Skip broken formulae 2010-08-07 18:08:48 -07:00
Max Howell
ef6488bf5e New Aliasing system is plenty less code :) 2010-08-07 18:08:48 -07:00
Adam Vandenberg
826ab8be71 Use build_head here too. 2010-07-18 10:44:31 -07:00
Adam Vandenberg
c37294e9d3 Allow user to override temp folder with HOMEBREW_TEMP 2010-07-03 21:48:37 -07:00
Adam Vandenberg
43d1f6790b Note how to redownload tarballs on failed checksum.
Fixes Homebrew/homebrew#659
2010-06-18 14:16:20 -07:00
Adam Vandenberg
76168e8e87 Add "fails_with_llvm" to formula to document LLVM build breaks.
Replaced ENV.gcc_4_2 + comments with calls to "fails_with_llvm",
to specifically message to the user when a formula is known or suspected
to not build with LLVM. If the user specifies "--use-llvm", the message
will be displayed, but compilation will be tried anyway.

Since using LLVM is now an advanced/hidden feature instead of the
default on 10.6, we'll let the user try anyway (and submit patches
if things are now working.)
2010-06-16 11:50:36 -07:00
Adam Vandenberg
6fd0a120f1 External: 'brew fetch' downloads tarballs to cache. 2010-06-15 12:38:04 -07:00
Adam Vandenberg
8af39f115c Set HOMEBREW_DEBUG_INSTALL when in a shell during install -d|-i
When an "install -d formula" fails, and the user gets dropped into an
interactive shell, set the HOMEBREW_DEBUG_INSTALL env var to the name
for the formula that failed. Also set variable if the user requests an
interactive install in the first place.

Note that this may be different than the formula being installed, since
it may have been a dep that failed.

Also remove todo in utils; users can now look for HOMEBREW_DEBUG_INSTALL
in their prompt command, and adjust their prompts accordingly.
2010-06-15 08:09:58 -07:00
Adam Vandenberg
1761ba66bf Failures during ./configure should mention config.log. 2010-06-10 12:57:51 -07:00
Adam Vandenberg
11449bfd67 Split patching message into downloading and patching 2010-06-01 20:49:10 -07:00
Adam Vandenberg
38d969ea7c Let GitDownloadStrategy report its cache location. 2010-05-05 21:20:11 -07:00
Adam Vandenberg
639ea39d9c Tweak formatting in previous commit. 2010-05-02 16:53:26 -07:00
Yarrow
305fca250e Show digest mismatch in verify_download_integrity
Report "Expected <supplied digest>, got <file's digest>"
when verify_download_integrity sees a mismatch.  (It had
been, confusingly, reporting "Expected <file's digest>".)

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-05-02 15:49:50 -07:00
Adam Vandenberg
ab9ccd7d89 Read all formula in a 'rescue' block.
For operations that read all formulae, catch exceptions and
skip broken ones, rather than bomb out entirely.
2010-04-17 09:34:03 -07:00
Martin Kühl
8fa99572f9 Only respect :using specs when downloading HEAD.
When a formula specifies both an `url` and a `head`, and the latter
specified a `:using` spec, brew would try to fetch the `url` using the
specified download strategy.  With this change, brew respects `:using`
specs only when determining the download strategy for `head`.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-04-10 08:21:24 -07:00
Adam Vandenberg
cfc8fca74d Support jruby external dependencies.
* Add tests that run only if 'jruby' is installed.
* Note that if your formula has :jruby deps, it should likely
  "depend_on 'jruby'" as well.
2010-04-09 11:21:35 -07:00
Adam Vandenberg
d9fe4f00a4 Only check @specs for :using if @specs exists. Fixes Homebrew/homebrew#1127. 2010-04-06 13:13:50 -07:00
Adam Vandenberg
663ea030fc Allow :using on head to specify a download strategy.
A 'head' in a formula can now specify which download strategy to use via
a ':using' specification:

    head 'http://svn.macosforge.org/repository/darwinbuild/trunk/',
        :using => :svn

This reduces the number of cases where "download_strategy" needs to be
overriden.
2010-04-06 12:54:11 -07:00
Adam Vandenberg
c59a638195 Remove silly concatenation. 2010-04-06 09:33:39 -07:00
Jake Good
8ce7abce73 More hashing refactoring to work with byte chunks
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-03-30 09:24:12 -07:00
Jake Good
9fbc26a39f More effective use of incremental MD5 to eliminate loading entire tarball into memory
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-03-23 21:23:25 -07:00
Adam Vandenberg
6586f89a29 Add md5 on 'brew create' if we can figure it out. 2010-03-22 21:19:20 -07:00
Adam Vandenberg
a9b19f0255 Move license block to separate LICENSE file. 2010-03-01 11:41:24 -08:00
Adam Vandenberg
080a7ee3dc brew --cache [formula]
This developer-oriented command lets you ask Homebrew what the cached
filename will be for a brew's tarball.
2010-02-24 11:15:12 -08:00
David Höppner
d8b093f279 Bazaar download strategy 2010-02-02 13:43:44 +01:00