113 Commits

Author SHA1 Message Date
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
Max Howell
22afc5e1c7 Use our own popen implementation in Formula.system
The rationale here is that the --verbose mode had a bug where it didn't escape its parameters properly. Which caused ocassionally cryptic issues.
2009-11-08 15:21:09 +00:00
Max Howell
1e879eaee8 Propagate exit status in ExecutioError exception 2009-11-07 18:22:36 +00:00
Max Howell
a4e86bb326 Move BuildError and ExceutionError to global.h
More sensible, and fixes brew
2009-11-07 18:22:35 +00:00
Max Howell
fc9ea77bb3 Better md5 mismatch exception 2009-10-24 16:20:11 +01:00
Max Howell
3d36b01da3 Camelcase class names around the . from filenames
Eg. shell.fm -> ShellFm
2009-10-19 13:48:34 +01:00
Max Howell
92964742aa Allow svn+http:// urls 2009-10-19 04:02:49 +01:00
Jannis Leidel
ef02031d7c Fix Homebrew/homebrew#52: Add ability to checkout a branch or tag.
GitDownloadStrategy and MercurialDownloadStrategy
now can be used like this:

  head 'git://server/repo.git', :branch => 'stable'
  head 'hg://server/repo/', :tag => '1.0.4'
2009-10-19 04:02:48 +01:00
Max Howell
53d6f617d7 Allow formula names with '+' in them
HFS+ handles the + fine. However the Ruby class name needs a s/+/x/g.

I acknowledge that supporting + will make it harder to port to certain other
filesystems. However that's your challenge! :D
2009-10-19 04:02:48 +01:00
Max Howell
ca1a6492bc s/require 'brewkit'/require 'formula'/g
brewkit.rb changes ENV destructively, so lets not do that everytime a formula
is required. Now it's possible for other tools to require a formula
description without worrying about side-effects.
2009-10-15 16:48:03 +01:00
Max Howell
ceef7729e0 Modernise the GRC formula somewhat
This was one of the first ones I wrote, so it lacks some of our more recent touches.
2009-10-03 15:23:45 +01:00
Max Howell
c130cf3e71 HttpDownloadStrategy renamed CurlDownloadStrategy
Because people didn't realise it was actually curl and thus supports eg. ftp too.
2009-10-02 20:01:23 +01:00
Max Howell
5f0d2dc032 Formula.etc is now HOMEBREW_PREFIX/etc
You generally don't want to have to copy the configuration to a new directory when you upgrade.
2009-10-02 16:30:33 +01:00
Adam Vandenberg
e66364502d Add SourceForge pattern to SubversionDownloadStrategy 2009-10-01 10:23:02 -07:00