1126 Commits

Author SHA1 Message Date
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
Adam Vandenberg
6d06b9a179 Create Download Strategy sooner in formula install code.
* Instantiate DownloadStrategy instance when creating a formula.
* Rename CurlDownloadStrategy member to clarify what it is for.
* Generate downloaded tarball name in initialize.
2010-02-01 12:50:16 -08:00
Florian Sowade
fa2162ef62 Added CMake parameter to suppress warnings
The -Wno-dev CMake parameter suppresses warnings
meant for the developer, not the user.
2010-01-14 09:40:20 +00:00
Ash Berlin
5193d835a4 Improve error when no url given 2010-01-13 13:33:43 +00:00
Max Howell
9f871c9955 Adds: depends_on 'simplejson' => :python
So far we only added python, but we can add more.

Fixes Homebrew/homebrew#401
2010-01-13 11:23:15 +00:00
Adam Vandenberg
e97c16f498 Fixes Homebrew/homebrew#433 2010-01-13 11:23:14 +00:00
Max Howell
d62fc63568 Formulary comments 2010-01-13 11:23:14 +00:00
Adam Vandenberg
7bd938206e Just try requiring, instead of looking for the name first. 2009-12-19 20:33:41 +00:00
Adam Vandenberg
db559a97dc Fix Formula path.
Linking "Library" under prefix is optional, but Library will always
exist relative to the REPOSITORY folder, so use that instead of prefix
for formula paths.
2009-12-19 20:07:47 +00:00
Adam Vandenberg
1a52c7f864 Allow https on more download strategies. 2009-12-17 19:19:33 +00:00
Adam Vandenberg
8443c9be7d Some small style reformats 2009-12-12 16:24:15 +00:00
Adam Vandenberg
b3c1e0aba2 Mercurial - recognize Google Code repos and support revisions. 2009-12-12 16:24:14 +00:00
Max Howell
4ce19ae2d7 Better error message if exec fails 2009-12-12 16:23:04 +00:00
Ben Olive
5131475ae1 Comments reflect actual patch level of 1.
Updated comments to match new default patch level from revision 4fe374d
2009-12-05 18:05:20 +00:00
Max Howell
4cea6157a1 include FileUtils into Formula
Thus mv, rm etc, functions are almost as handy as pure shell scripting, without issues related to spaces in filenames.
2009-12-01 12:07:34 +00:00
Adam Vandenberg
224beabdd5 Refactor formula_test. 2009-11-19 14:13:31 -08:00
Adam Vandenberg
7366a41268 New command 'brew deps [formula]'
Where brew info will show the next-level-down dependencies, brew deps
will show all of the formulae that a given formula depends on.
2009-11-19 14:03:07 -08:00
Adam Vandenberg
95e398ab13 Add alias support to formulae
* brew install will find an aliased formula
* aliases are searched against
* warn when creating a new formula that has an existing alias.

If Subversion has an alias "svn", then warn when the user tries to
create a new formula "svn". The formula can still be created, though
the user should make sure it's not a duplicate of the existing
aliased one.

Subversion and Objective-Caml formulas get some alises here, so we have
something to test against.
2009-11-19 14:03:07 -08:00
Adam Vandenberg
af29299f37 Add brew command 'uses'
'uses' shows the formulas that depend on a formula given on the
command-line.
2009-11-19 14:03:07 -08:00
Adam Vandenberg
ed4992f467 Add a Formulary class for managing the Formulae
These methods could be static on Formula, but splitting them out makes
it clear to formular authors that these functions don't have anything
to do with writing new formulas.
2009-11-19 14:03:07 -08:00
Max Howell
4bd32c615e Fix system() exception showing regression
Rather than showing a backtrace that says "couldn't find command blah". Admittedly it's possible that the error will be something else, but unlikely. And this is neater.

Ideally we'd push the bt through an error pipe like we do with install.rb. And I guess we'll do this eventually.
2009-11-11 19:42:35 +00:00
Max Howell
75c7c942a1 Don't ignore interupts during Formula.system
As I understand it (I tested too), signal propogation is handled by the parent Ruby process. However this was working mostly anyway. So I don't fully understand what is going on. However this seems to not hang in Process.wait where it was before for one test case.
2009-11-09 17:55:13 +00:00
Max Howell
fe15b9b003 Reap the process or make zombies 2009-11-08 15:21:15 +00:00