This version number is arbitrary, and only used to differentiate versions
in bug reports.
There have been enough changes to compiler detection since 0.8 that it makes
sense to bump the version here.
Several issues have been caused by conflicts between the options
Homebrew passes to curl and those read from $HOME/.curlrc. Passing '-q'
will force curl to ignore settings in that file.
Suggested in Homebrew/homebrew#9027.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
The code was sucking. To the extent that maintenance was hard. It's a lot
easier to work with code that is sensibly split at sensible boundaries. So
now it is more like that.
But the refactor is minimal. Because we don't want you to have more merge
hell than absolutely necessary.
If you merge you will need to pay attention to brew.h.rb (as it is deleted)
and bin/brew (as command logic is gone). It will be painful, but you will just
have to help git out by moving any changes around manually.
Note compatibility.rb. It ensures that any function renames or removals don't
break anything. We're pretty serious about backwards compatibility. And that's
because we encourage you to hack around with the innards. And we couldn't do
that if we would then just make stuff disappear behind your back.
The Homebrew version number is mainly useful for bug reports. Since it is
included in "brew --config" output, it is an easy way to see roughly how
new the a user's version of Homebrew is.
Bumping the micro version now, in anticipation of some more version-changing
events in the near future.
Changes in this version include:
* Aliases are now defined by relative symlinks rather than in the
formulae themselves. Many commands are faster now that they don't
have to read every formula to find aliases.
* "url" now supports the same features as "head", including ":using"
and version specifiers for VCS systems.
* Files and methods marked for deprecation in 0.7 have been removed.
* The Formula DSL now supports "skip_clean :all" and "keg_only 'reason'"
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.
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.
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.
The Contributions/selflink.sh script does not symlink the .git directory,
so 'brew update' will fail because the prefix (/usr/local/) is not a git
repository.
To determine the actual location of the git repo we can get the realpath
of the Library (to expand any symlinks) and take the parent of that.
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.