| Age | Commit message (Collapse) | Author |
|
|
|
Generally this isn't desired or useful.
|
|
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.
|
|
|
|
Only unlink the keg, don't prune. That's enough, we shouldn't do general maintenance anyway.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
|
|
|
|
The classes better reflect their contents. I'm sure this change may be
contentious, but I am a sucker for trying to create source bases that are easy
to get to grips with and easy to navigate.
brewkit.rb is now a deprecated file.
|
|
This works better as it comes after any keg-only deps change ENV, but also it needs to happen after brewkit is required and that only happens in install now.
|
|
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.
|
|
Mainly because this feature is for devs and the code is too messy to fix it properly yet.
|
|
|
|
`brew list` fails after fresh install because Cellar directory doesn't exist yet.
|
|
Follow symlinks when trying to find HOMEBREW_RUBYLIB.
Signed-off-by: Max Howell <max@methylblue.com>
This is now supported usage, it wasn't before. I amended the patch quite heavily because it broke our other supported usage, ie. complete symlinking of Homebrew into /usr/local
|
|
Determine all directories that aren't Homebrew ones.
Exec find.
I prefer to keep short stuff in bin/brew so people reading the code have a better idea of what happens, and what sort of functions are useful for the sorts of things we do with Homebrew.
|
|
|
|
|
|
Very quick way to find files not installed by homebrew.
Taken from a command by mxcl on the homebrew wiki.
.DS_Store files and bin/brew are ignored.
|
|
|
|
|
|
We shouldn't mess with the user's PATH anyway. So assume our users are smart and just warn them about potential issues instead.
|
|
|
|
|
|
|
|
Axel tries to accelerate downloads by using multiple connections (possibly to
multiple servers) for one download. Because of its size, it might be very
useful on bootdisks or other small systems as a wget replacement.
|
|
Signed-off-by: Max Howell <max@methylblue.com>
I adapted it slightly based on the user agent that Safari gives.
|
|
I'm trying to only show the interesting stuff. You can see a full listing with
brew -v list, or by piping to other commands.
Tell me if you hate it or love it.
|
|
Shows the git-log for that formula.
|
|
Otherwise you run the risk of not running the exact version / make of the utility you planned.
Fixes Homebrew/homebrew#48
Really we need to do this formula too, so I guess a make and cmake function are on the way…
|
|
References issue Homebrew/homebrew#48
|
|
Stupidly I figured Ruby did this for us, but why would it?
|
|
I used the same option flag as ruby gems does.
|
|
|
|
Ohai is for titles, to separate sections of output so it is more readable, it
truncates long lines for this purpose. So don't use it if the line you are
outputting is likely to be long and important. Instead prefix that line with
a summary header.
|
|
Conflicts:
Library/Formula/imagemagick.rb
Library/Formula/taglib.rb
Library/Homebrew/brew.h.rb
Library/Homebrew/formula.rb
bin/brew
|
|
Is it a DSL? No. But people call it that apparently.
To add a dependency:
class Doe <Formula
depends_on 'ray'
depends_on 'mee' => :optional
depends_on 'far' => :recommended
depends_on Sew.new
end
Sew would be a formula you have defined in this Formula file. This is useful,
eg. see Python's formula. Formula specified in this fashion cannot be linked
into the HOMEBREW_PREFIX, they are considered private libraries. This allows
you to create custom installations that are very specific to your formula.
More features to come, like specifying versions
|
|
I left update_from_masterbrew! as a historical reference.
|
|
|
|
I didn't change the class name, it's clear from the context where it is used what it does. However when just looking at files to figure out the nature of Homebrew I believe in clear naming.
Otherwise funny names earn you points.
|
|
|
|
|
|
|
|
|
|
For this to work the "running script" must be the formulae file. Making this
so wasn't so hard, there is now an install.rb script which is included with
the -r flag to the ruby executable. An at_exit handler calls the install
function.
Having the install logic in its own file made it feel like there was so much
space that I added extra error handling. So there is something to be said for
separating functionality out into its own files.
Still the error handling sucks, we'll need to marshall the exception back to
the bin/brew command. Which is another PITA.
Still overall I think this will prove worthwhile. But if it doesn't we'll
revert.
As a first usage, you can put a diff after __END__ and return DATA from
Formula::patches to make Homebrew aware of it.
|
|
See comments in commit for details.
|
|
|