17988 Commits

Author SHA1 Message Date
Max Howell
d3a52adce3 Nice the install process
Makes a big difference on OS X, you can still use the GUI and that.
2009-12-02 10:39:26 +00:00
Max Howell
a687871ae1 Alias gcc_4_0_1 to gcc_4_0
This is what we did for gcc_4_2 after all.
2009-12-02 10:39:06 +00:00
Max Howell
e1690dd4aa When not installed to /usr/local use -isystem
This means our include directory is prioritised above all -I but after all other system directories. This is how it should be.

Also helps fix Homebrew/homebrew#113.
2009-12-01 12:07:34 +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
Max Howell
9294e19859 brew --config output improved if no GCC 2009-12-01 12:07:34 +00:00
Max Howell
a011dd6762 Direct bug reports to the issues URL 2009-12-01 12:07:33 +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
Adam Vandenberg
4fbcf13e65 Move some helper functions into Hardware 2009-11-19 14:03:06 -08:00
Adam Vandenberg
83fc432eab Refactor formula_test. 2009-11-18 15:50:01 -08:00
Adam Vandenberg
6e7731aeff Add test for legacy prefix quoting. 2009-11-18 15:43:00 -08:00
Adam Vandenberg
47a38f49f1 Fix HOMEBREW_BREW_FILE for unit tests. 2009-11-18 15:39:51 -08:00
Adam Vandenberg
bc378d091b Compare against HOMEBREW_CELLAR using real paths.
The code in Keg.self.for path uses "path = path.parent.realpath" to walk
up subfolders looking for a Keg.

Because 'realpath' is in there, and the path is checked against
HOMEBREW_CELLAR, which  may be a symlink, we need to do realpath-to-realpath
comparisons in Keg. Otherwise, we will hit equivalent but symlinked folders,
not see that they are the same, and walk all the way up to / and then
error out.
2009-11-12 12:47:17 -08:00
Max Howell
55f7b826d9 Check for $! before installing
If an exception is thrown while parsing the formula file before the install.rb at_exit then it will be in $!. Marshal it back to the parent brew process.
2009-11-12 01:37:02 +00:00
Max Howell
00e227ac46 More tweaking of main exception handler output 2009-11-12 01:37:02 +00: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
8c21cd4c64 It's about time we bumped the version eh? 2009-11-11 18:43:03 +00:00
Max Howell
45a1a2ba3c Tty.em; bold white underlined 2009-11-11 18:36:50 +00:00
Max Howell
fd3ddf8a72 Disable watch_out_for_spill temporarily
It's a great feature but it seems to conflict with our new system() replacement. Clearly the bug is still in our system() but what exactly it is is not clear and this bug sucks.

See Homebrew/homebrew#124
2009-11-11 17:29:34 +00:00
Max Howell
a46206bdc9 Ignore spill in all /*/Library/Caches 2009-11-11 17:29:34 +00:00
Max Howell
b99324fbeb DRY gcc_build and llvm_build 2009-11-09 18:47:26 +00:00
Max Howell
04f3ddeac0 Ignore stdout during GitDownloadStrategy.stage 2009-11-09 18:24:36 +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
1da26d89ea Don't use Kernel.system much
It just seems to behave strangely with SIGINT. Eg. SIGINT causes tar to exit, but the SIGINT is ignored by our process. This is not the case when used with curl.
2009-11-09 17:55:11 +00:00
Max Howell
590f64e302 Don't error out if .DS_Store is in a keg 2009-11-09 17:55:06 +00:00
Max Howell
20b7fa6ef8 Don't watch for spill for Quicktime stuff 2009-11-08 22:00:03 +00:00
Max Howell
80b555057c Ignore spill for certain system paths 2009-11-08 15:21:15 +00:00
Max Howell
fe15b9b003 Reap the process or make zombies 2009-11-08 15:21:15 +00:00
Max Howell
86516e563f Set ENV[HOMEBREW_BREW_FILE]
Thus install.rb gets the path to the instantiating brew process rather than whichever is first in the PATH. Not to mention Homebrew doesn't *have* to be in the PATH.
2009-11-08 15:21:14 +00:00
Max Howell
6b18d5572d Rename BREW_FILE HOMEBREW_BREW_FILE
Because it's a global.h constant and that file can be included by other projects.
2009-11-08 15:21:14 +00:00
Max Howell
2dc17b19f4 List --HEAD/-H in brew usage 2009-11-08 15:21:14 +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
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
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
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
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
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
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