104 Commits

Author SHA1 Message Date
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
Max Howell
db2ccd294d Formula.var is now HOMEBREW_PREFIX/var 2009-10-01 15:17:31 +01:00
Austin Ziegler
668e3ee080 Adding CVS and Mercurial download strategies. 2009-09-30 18:52:12 +01:00
Max Howell
9d3ddfb466 Var goes back in the keg. Fixes Homebrew/homebrew#67
I'm not sure about this still, as if you uninstall mysql do you want to lose
all the var stuff it created? Maybe. Probably not.

But there were issues unresolved having it in the unversioned-keg. So I'd
rather look at this again later, and fix the bugs without hacks for now.
2009-09-30 01:24:49 +01:00
Max Howell
98081ce26a Don't fail when cleaning if skip_clean_paths is empty 2009-09-29 23:52:21 +01:00
Andre Arko
cacf8d8aa4 Allow skip_clean as a class method
Pass in a list of any files that you don't want cleaned
with a path relative to the cellar. e.g. `strip_paths ['bin/znc']`
It's backwards compatible with def strip_clean?, at least for now.

The znc formula is updated as an example.
2009-09-29 23:34:16 +01:00
Andre Arko
64bab9d746 eval bad 2009-09-29 23:34:16 +01:00
Max Howell
3971a5666c Oops. Don't raise for homepages. Silly. 2009-09-26 02:20:00 +01:00
Max Howell
4b5d39feab Throw if no homepage set
That'll teach you!
2009-09-25 19:22:02 +01:00
Adam Vandenberg
b2a857da54 Add better error message for misnamed formula class. 2009-09-25 19:20:59 +01:00