The new formula debugger users continuations to jump back up the stack,
and thus anything that has the potential to be executed twice (i.e.
ensure blocks) needs to to be essentially idempotent.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Enumerable#one? is not available under Ruby 1.8.6. Further, we really
want #any? here, as setting both HOME and CURL_HOME can trigger a false
negative.
FixesHomebrew/homebrew#15883.
stdenv already works as Contributions/cmds is in the path already.
This is safe to do because OS X already has git and svn in the PATH if you have the CLT installed. So we should definitely ensure we use the right versions.
FixesHomebrew/homebrew#15783.
This allows Homebrew to be installed into /opt or /sw.
ClosesHomebrew/homebrew#15780.
Signed-off-by: Max Howell <mxcl@me.com>
Cleaned up the patch a little. Still ugly though, but logic is unusual so that's just how it is.
This has to be a last resort right? If all we show is that link (plus preceding un-deletable output) and they don't click it then maybe we should just close the ticket and hope they'll use MacPorts instead.
A new feature for easing the pain of working with complex formulas, or
formulas for large packages. When running brew in debug mode (-d), if an
exception propagates outside the formula's install method, you now get a menu
which lets you return to the point where the exception was raised and perfom
several useful actions, such as:
- printing a backtrace
- entering IRB to examine the context and test ruby code
- entering the debugger (if ruby-debug is available)
- entering a shell
- ignoring the exception or proceeding with the raise as normal
Signed-off-by: Max Howell <mxcl@me.com>
* Fixed conflict in build.rb.
* Removed old debug handling in Formula.brew.
ClosesHomebrew/homebrew#10435.
Added doctor check for .curlrc rather than silently ignoring it (#13836).
ClosesHomebrew/homebrew#15419.
Signed-off-by: Max Howell <mxcl@me.com>
Removed test in doctor where it actually curl'd a file. It's enough to warn if the curlrc exists. I understand people want to remove the warnings, but the point in the doctor is to help diagnose and not to be some ramification of your UNIX system.
To allow
depends_on :x11 => :optional
and friends to work as expected, make requirements record any tags and
add special handling to the X11Dependency to record both a minimum
version and additional tags.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
show_header should default to false (we don't want to display it in the
case of installing a single formula without dependencies), but it only
worked this way by accident.
The assignment "show_header = true" creates a local variable named
show_header, and in the case where needed_deps is empty and this
assignment is not actually executed, the latter usage evaluates the
local variable instead of calling the method.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
The cleaning step changes permissions on files. Added a commented-out block
that will show permission changes when doing verbose builds.
Since this output is not generally useful for even normal verbose builds,
added as commented-out code (I'm sorry) so that maintainers can uncomment
it when this functionality is needed for debugging.
* Renames --force to --overwrite, freeing up brew ln --force for Homebrew/homebrew#13349
* Changes --dry-run to preview linking by default, rather than
overwriting. An overwrite dry-run can be simulated via both
--dry-run --overwrite
* Adds some basic Keg tests
When the current working directory is the root of the build tree, copy
it instead of moving it, otherwise an exception will be raised when we
try to clean up the build tree later.
Noticed when unpacking the vim source tree from a mercurial checkout.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
While at it, make it use class methods instead; no reason to instantiate
an object for this.
Eventually there should be some functional tests for the individual
strategies as well.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
By default, git checks out the fetched ref after cloning the repo, but
this is unnecessary as we explicitly check out the desired ref during
staging. This also silences some unnecessarily confusing output.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>