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>
"git status -s" is used to detect if the repository was corrupted during
an interrupted clone, but it can leak output to the terminal, so use
quiet_system.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
ComparableSet only allows a single object of a given class,
choosing the object with the greatest value. This was mainly created
for Requirements, so that, e.g., two X11Dependencies of differing
strictness don't both end up in the same requirement set.
FixesHomebrew/homebrew#15240.
This started happening as a result of bbc167b, which avoids reloading
previously defined formulae. The exception alters its message if the
name parameter appears to be a tapped formula, but this is lost if we
only pass in the "stem" of the pathname.
Long-term this probably needs some restructuring, perhaps with a
separate exception for tapped formula, but for now this should re-enable
the more useful error message.
FixesHomebrew/homebrew#15374.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
mkpathed directories aren't really "linked" or "unlinked" per se,
and link/unlink handle directories differently. It's easier just to
ignore them, which finally synchronizes link/unlink counts.
For real this time.
This makes sure that files won't be unlinked if they resolve into
other kegs. For example: if fish and fishfish are both installed,
with fishfish linked and fish unlinked, `brew unlink fish` would
unlink some files that resolve into fishfish's keg.
A required special case since formula that use python can optionally use system python or Homebrew python. We'll probably need more of this sort of thing.
As discussed with mistym, it's not only compiled code that goes in
/usr/lib, but any types of libraries. As such, .pm was added to the
valid extensions list a while back. Unfortunately, .sh was not added,
even though configuration includes and platform function library shell
files are often put in /usr/lib as shellscript libraries. This patch
adds .sh to the list of valid library extensions.
ClosesHomebrew/homebrew#14993.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
The changes to error ouput and logging require a few more things to be
visible during installation tests.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
- Install a sitecustomize.py that is only executed for brewed
python to
- Fix the prefix, python thinks it is installed to.
(Remember, Python thinks it lives in the Cellar)
- Remove "/System/..." stuff from sys.path which caused
a lot of install trouble because setuptools has the
habbit to inject itself upfront, overwriting our distribute.
- Allow --with-poll and don't say, we didn't warn you.
- Don't need depends_on :x11 any longer. Yeah, no XQuartz!
- Add --with-brewed-openssl
- pip 1.2.1
- pip, pip-2.7, easy_install and easy_install-2.7 are installed
to prefix, such that they are directly available, even if
people have not set their PATH to include
$(brew --prefix)/share/python
- Caveats shorter and clear.
- For Xcode-only:
- Patch the distutils buildsystem to use "xcrun cc" etc.
- Teach distutils the MacOS.sdk_path (for incs and libs)
- superenv.rb add the right python include dir depending on
whether a brewed python is installed or not.
ClosesHomebrew/homebrew#15064.
Signed-off-by: Max Howell <mxcl@me.com>