2633 Commits

Author SHA1 Message Date
Jack Nagel
bba85b4bd9 Formula#system: don't try to close a closed stream
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>
2012-11-09 14:04:08 -06:00
Jack Nagel
3bdce1a7fa Fix typo in postgres requirement 2012-11-08 16:24:52 -06:00
Jack Nagel
1c56cda4f1 Factor out MySQL and Postgres requirements 2012-11-08 16:01:59 -06:00
Jack Nagel
1cb59ea5fd Fix curlrc existence check
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.

Fixes Homebrew/homebrew#15883.
2012-11-06 19:02:02 -06:00
Jack Nagel
45e208d26b Move conflict message into conflict class 2012-11-06 17:48:34 -06:00
Jack Nagel
21098905ab Fix framework install names 2012-11-06 13:04:40 -06:00
Jack Nagel
5de12d7182 Inject framework paths into stdenv compiler flags 2012-11-06 12:32:10 -06:00
Jack Nagel
7f9c03c1ff Link Frameworks into top-level Frameworks directory 2012-11-06 12:32:09 -06:00
Jack Nagel
2f542f657e Combine duplicated postfix conditionals 2012-11-06 12:32:09 -06:00
Jack Nagel
f8183d9510 Hoist top-level directory list into a constant 2012-11-06 12:32:09 -06:00
Charlie Sharpsteen
c92971f475 doctor: Remove fuse.pc from the whitelist
Having a third-party `fuse.pc` file will conflict with the `fuse4x` formula.
2012-11-03 15:44:51 -07:00
Max Howell
d458200223 superenv: Builds need to use the right git/svn too
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.

Fixes Homebrew/homebrew#15783.
2012-11-02 09:34:25 -04:00
Jack Nagel
fa6cf55f58 Add Xcode 4.5.2 to standard compilers map
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-11-01 14:13:26 -05:00
Adam Vandenberg
5e212a76e3 Error out on lowercase --head parameter to install.
Fixes Homebrew/homebrew#14815.
2012-11-01 08:08:40 -07:00
Xiyue Deng
6762780f3e Whitelist Homebrew's own prefix in superenv.
This allows Homebrew to be installed into /opt or /sw.

Closes Homebrew/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.
2012-11-01 09:51:41 -04:00
Max Howell
beb5f97614 Fix build failure being non-verbose when --verbose 2012-10-31 11:28:29 -04:00
Max Howell
394549dd3d Only show the troubleshooting link
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.
2012-10-31 11:28:29 -04:00
Adam Vandenberg
e502728641 Superenv: be more specific about -O flags
Closes Homebrew/homebrew#15775.
2012-10-31 06:50:50 -07:00
Sijawusz Pur Rahnama
32b1d46c96 Add support for 7zip archives
Closes Homebrew/homebrew#15723.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-29 14:57:23 -05:00
Charlie Sharpsteen
376fa59901 brew-update: Guard non-directory files in Taps
Skip any entries returned by `Dir["Library/Taps/*"].each` that are not
directories.
2012-10-28 12:34:43 -07:00
Adam Vandenberg
1b991c5aae formula: shorten path helpers 2012-10-28 08:54:54 -07:00
Camillo Lugaresi
18dbe47f9f debrew: formula debugging for homebrew
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.

Closes Homebrew/homebrew#10435.
2012-10-28 11:39:02 -04:00
Max Howell
f6091b1c85 Specify where to get the CLT package 2012-10-28 10:52:07 -04:00
Stephen Nelson
e7a9f6eb89 Homebrew should not ignore curlrc
Added doctor check for .curlrc rather than silently ignoring it (#13836).

Closes Homebrew/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.
2012-10-28 10:52:07 -04:00
Max Howell
a967f5c82a Use cc -E, not cpp -E. Fixes Homebrew/homebrew#15402. 2012-10-28 10:52:06 -04:00
Adam Vandenberg
73b3977ab4 Pathname: add exec and jar helpers
Closes Homebrew/homebrew#13318.
2012-10-27 19:28:42 -07:00
Jack Nagel
267ffddbd3 tests: define assert_empty for Ruby <= 1.8
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-25 22:09:23 -05:00
Jack Nagel
762c355b30 ComparableSet#merge returns self
Set#merge is supposed to return self, and Formula#recursive_requirements
depended on this being true.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-25 15:54:55 -05:00
Jack Nagel
07d9adc295 test_cleaner: add missing require
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-25 14:29:43 -05:00
Jack Nagel
d1f754c02e Allow requirements to record tags
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>
2012-10-25 14:28:53 -05:00
Jack Nagel
a1af5a6cc3 Move requirement subclasses to a separate file
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-25 12:51:36 -05:00
Jack Nagel
e1da727a4e FormulaInstaller: disambiguate show_header usage
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>
2012-10-24 22:59:24 -05:00
Jack Nagel
96844850b4 Return the block value in ARGV.filter_for_dependencies
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-24 17:54:16 -05:00
Adam Vandenberg
babf25af1a doctor: check that Xcode prefix actually exists
Closes Homebrew/homebrew#14373.
2012-10-24 11:16:57 -07:00
Adam Vandenberg
fd1fd78a94 Cleaner: add (commented-out) debugging information for permission changes
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.
2012-10-24 09:20:56 -07:00
Adam Vandenberg
ec24f6528d Make --ignore-dependencies work again 2012-10-23 16:05:01 -07:00
Misty De Meo
18f5bf1092 Fix Keg tests
* unreverse expected/actuals
* don't assume linked file order is guaranteed - it wasn't!
2012-10-23 17:10:12 -05:00
Adam Vandenberg
e99ca2d59f Add relinking instructions.
Closes Homebrew/homebrew#15488.
2012-10-22 12:27:17 -07:00
Adam Vandenberg
6283246691 Latest Xcode is 4.5.1 2012-10-22 10:01:24 -07:00
Adam Vandenberg
4cbf036c17 Allow varags to skip_clean 2012-10-21 13:24:02 -07:00
Adam Vandenberg
b25740d61c audit: loosen ARGV check 2012-10-21 13:24:00 -07:00
Misty De Meo
447f78c0d2 brew ln --force is now brew ln --overwrite
* 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
2012-10-20 21:00:46 -05:00
Adam Vandenberg
7b08e5a05c Sanity check 2012-10-19 18:56:18 -07:00
Mike McQuaid
425440de3b Add Jenkins version matching (and test). 2012-10-16 10:31:35 +01:00
Jack Nagel
55fabe36e0 brew-unpack: don't attempt to mv the build directory
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>
2012-10-16 00:56:55 -05:00
Jack Nagel
73b7c52673 Reduce code footprint of standard compilers map
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-15 18:17:22 -05:00
Jack Nagel
ca45225fad Flatten share_mkpaths
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-15 18:03:07 -05:00
Jack Nagel
39ec66614b Test coverage for DownloadStrategyDetector
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>
2012-10-15 17:45:48 -05:00
Jack Nagel
bab29bab72 GitDownloadStrategy: avoid unnecessary checkout
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>
2012-10-15 15:29:23 -05:00
Jack Nagel
799c164cd9 GitDownloadStrategy: silence checkout actions in non-verbose mode
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-15 15:29:23 -05:00