45549 Commits

Author SHA1 Message Date
Max Howell
0ec10c68ca Include /Library in watch_out_for_spill 2009-11-07 18:22:36 +00:00
Max Howell
455271ed12 Blacklist RubyGems creation 2009-11-07 18:22:36 +00:00
Max Howell
fba0a5c5cd brew edit works if the file in question won't parse 2009-11-07 18:22:36 +00:00
Max Howell
57fc32d279 Solve the brew install, brew rm, brew install problem for HEAD formula
The problem was that git checkout -b doesn't work the second time. This simple solution works by never creating a local branch.
2009-11-07 18:22:36 +00:00
Erik Kastner
96de6ba870 adding zsh completion 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
6386ce4df5 Provide system info for build errors 2009-11-07 18:22:34 +00:00
Max Howell
7ec2874746 Fix ENV.m32 when LDFLAGS already exists 2009-11-07 18:22:34 +00:00
Max Howell
c5eb65332d Don't require hardware.rb globally 2009-11-07 18:22:33 +00:00
Max Howell
107235c5dd Typo correction 2009-11-07 18:22:33 +00:00
Max Howell
173f5f4a87 Fixed SIGINT handling, so we can have our newline
We trap the INT in the install process now so the newline race condition is avoided. Much neater and more polished now.
2009-11-07 18:22:33 +00:00
Max Howell
e587c68a2a Better error for unknown brew commands 2009-11-07 18:22:33 +00:00
Max Howell
3d89578b5c Use HOMEBREW_REPOSITORY for brew log 2009-11-07 18:22:33 +00:00
Max Howell
8f46b32d26 Raise if ARGV.next is out of bounds 2009-11-07 18:22:33 +00:00
Max Howell
78d7cbc812 Slightly better ARGV.usage for contribution 2009-11-07 18:22:33 +00:00
Max Howell
8081a95c4a Better errors if missing keg or formula arguments 2009-11-07 18:22:33 +00:00
Max Howell
03ca3e24d0 Don't throw if named.empty?
Generally this isn't desired or useful.
2009-11-07 18:22:33 +00:00
Max Howell
794a55a72b brew install improvements
Couldn't make this atomic, apologies.

Fixes a few things, like deps failing to build not aborting the install.
--force now works properly again.

Overall more robust code. I went back over it all and gave it a lot of
thought.

Cleaner separation of logic. Less code in brew, now the only code there is
ARGV handling, and basic sanity checks.

Not extending ARGV or ENV in global now as that would propagate to other tools
or utilities you may write.
2009-11-07 18:22:28 +00:00
Max Howell
e046e1e640 More useful Macports/Fink detection function 2009-11-04 16:27:37 +00:00
Max Howell
adf8d30a92 Faster uninstall
Only unlink the keg, don't prune. That's enough, we shouldn't do general maintenance anyway.
2009-11-04 16:27:37 +00:00
Max Howell
0cc45884bb Fixes Homebrew/homebrew#106; Don't downcase ARGV.named 2009-11-04 16:27:37 +00:00
Adam Vandenberg
c76d652da2 Tweak code to locate Cellar path.
I think this tweak to finding the Cellar path addresses one of mxcl's
concerns over supported install scenarios.
2009-11-04 16:27:36 +00:00
Adam Vandenberg
3087888fb0 Rewrite of HOMEBREW_ folder locations
This rewrite attempts to sort out where the Prefix, Cellar, and
Repository are relative to the real and symlinked 'brew' command.

Also included is a --config option which dumps all of these variables.

Any top-level script must define a "BREW_FILE" that gives the path
to brew as it exists in the path. 'brew' itself just uses __FILE__ and
install.rb does a `which brew` (there may be a better way?)

The Prefix is always relative to the location of brew as it exists in
the path. Thus, whether or not /usr/local/bin/brew is a symlink or real
file, the Prefix is always /usr/local. If you have brew in some other
prefix, such as /nonstandard/bin/brew, then '/nonstandard/ will be
managed by brew instead.

The Repository, Cellar, and "Library/Homebrew" required code is always
found relative to the "real" path or brew. If brew is a real file in
/usr/local/bin/brew, then everything else will be found in /usr/local
and we'll expect a /usr/local/.git

Otherwise, we dereference brew's symlink and look for everything else
relative to that path instead.
2009-11-04 16:27:34 +00:00
Max Howell
ffe4f25d87 Marshal install.rb exceptions back to the parent process
Using an error pipe.

The use of ENV[HOMEBREW_ERROR_PIPE] feels wrong, but I wasn't sure how else to
proxy the file descriptor to the child process since the fork immediately
calls exec.
2009-10-24 16:20:58 +01:00
Max Howell
fc9ea77bb3 Better md5 mismatch exception 2009-10-24 16:20:11 +01:00
Max Howell
e289164adc Implement inreplace natively in Ruby
I found yet another instance where the escaping wasn't perfect, so got fed up and just did it in Ruby. I hope this works for all existing usage. It should.

The bonus here is that you can use RegExps now.
2009-10-23 19:22:51 +01:00
Bradley Grzesiak and Nick Karpenske
7375758c9a Warn that chown -R /usr/local may break mysql 2009-10-23 19:22:51 +01:00
Max Howell
d967421c6e The tests need the actual optparse apparently 2009-10-23 19:22:51 +01:00
Alexander Solovyov
6ca096125d Fixes Homebrew/homebrew#97: add fake optparse.rb 2009-10-23 19:22:51 +01:00
Max Howell
e1995d60ef Call to_s on ohai parameters 2009-10-23 19:22:51 +01:00
Max Howell
ac277f5c22 Show backtrace during non fatal install steps if --debug 2009-10-23 19:22:51 +01:00
Max Howell
3570214d20 Allow multiple formula to symlink the same directory
During the link step, if the destination symlink already exists, unlink it, and create a directory instead, then relink the original contents. Then continue linking the formula in question.

Fixes Homebrew/homebrew#62
2009-10-23 19:22:07 +01:00
Max Howell
03f37bef79 ENV.m32 2009-10-23 19:20:16 +01:00
Max Howell
6de6bffd55 ENV.osx_10_5 2009-10-23 19:20:16 +01:00
Max Howell
79530df421 Remove mercurial and scons from the create blacklist
Blacklist wxwidgets, it's in /usr/X11/lib.
2009-10-23 19:20:16 +01:00
Max Howell
5599316971 Don't look broken if CWD doesn't exist
Ruby throws if CWD doesn't exist, even when you aren't doing anything related to the CWD. Sucks. So at least show the user a friendly error message rather than looking broken.
2009-10-23 19:20:12 +01:00
Max Howell
1fcd449c6e Show where we cached the download 2009-10-23 19:12:29 +01:00
Max Howell
2b4f9e45b2 Improved installation instructions
I managed to get the install line down to a one-liner.
2009-10-23 19:12:29 +01:00
Adam Vandenberg
e1d82cde79 Add separator param to ENV.append (to match prepend.) 2009-10-21 11:50:37 -07:00
Adam Vandenberg
eafba2261f Allow revisions on SVN checkouts. 2009-10-20 20:50:20 -07: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
595dbc5710 ENV.universal_binary
Note, we still don't support PPC, this builds a 32 bit, 64 bit binary.
2009-10-19 13:48:33 +01:00
Michael Stephens
9d290b4502 Add dependencies to 'brew info' output 2009-10-19 04:02:49 +01:00
Max Howell
92964742aa Allow svn+http:// urls 2009-10-19 04:02:49 +01:00
Max Howell
b81ea96ca2 Reimplemented HttpDownloadStrategy needs 4 parameters now 2009-10-19 04:02:48 +01:00
Max Howell
995c2d5a13 Remove assignment to unused temporary variable 2009-10-19 04:02:48 +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
06e16bff7d Remove check for gcc
Since plenty of formula don't require it, I don't want to insist on gcc being installed. A better check is if gcc is required then check for version 4.2, which is all we support.

However I can't easily do that. So I'm risking bug reports from people who didn't read the installation instructions and didn't install the right Xcode. But they deserver derision :P
2009-10-15 16:51:59 +01:00
Max Howell
6c2555b476 Allow --force for blacklisted formula names 2009-10-15 16:51:59 +01:00