Report "Expected <supplied digest>, got <file's digest>"
when verify_download_integrity sees a mismatch. (It had
been, confusingly, reporting "Expected <file's digest>".)
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
When a formula specifies both an `url` and a `head`, and the latter
specified a `:using` spec, brew would try to fetch the `url` using the
specified download strategy. With this change, brew respects `:using`
specs only when determining the download strategy for `head`.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
A 'head' in a formula can now specify which download strategy to use via
a ':using' specification:
head 'http://svn.macosforge.org/repository/darwinbuild/trunk/',
:using => :svn
This reduces the number of cases where "download_strategy" needs to be
overriden.
* Instantiate DownloadStrategy instance when creating a formula.
* Rename CurlDownloadStrategy member to clarify what it is for.
* Generate downloaded tarball name in initialize.
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.
* 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.
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.
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.
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.
GitDownloadStrategy and MercurialDownloadStrategy
now can be used like this:
head 'git://server/repo.git', :branch => 'stable'
head 'hg://server/repo/', :tag => '1.0.4'
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
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.