27549 Commits

Author SHA1 Message Date
Jack Nagel
c2fd7856d2 Prevent repeated lookups of nil-valued keys 2013-01-08 10:21:28 -06:00
Jack Nagel
dfa387700d Allow conversion of Dependencies to Array
This is needed for the intersection code in `brew deps` to work right,
but can hopefully be refactored away somehow eventually.
2013-01-07 18:17:51 -06:00
Mike McQuaid
c670339c02 Fix brew-test-bot for new test DSL. 2013-01-07 23:48:10 +00:00
Jack Nagel
967a60a054 Detect when tests are defined 2013-01-07 17:37:28 -06:00
Jack Nagel
429caf69a9 Remove Array subclassing
Inheriting from Array (and other core types) is problematic:

  - It exposes a very wide interface with many methods that are not
    really relevant to the subclass.
  - It can cause some weird side effects, as many Array operations are
    in C and have hardcoded return values; for example, combining two
    array subclasses returns a new Array instead of the subclass.

Avoid these problems using delegation and the Enumerable module where
applicable.
2013-01-07 14:32:14 -06:00
Mike McQuaid
7473d2b12f Fix local bottle installation with hyphens. 2013-01-07 20:27:27 +00:00
Jack Nagel
6641fc4017 version: mark some implementation details as protected 2013-01-07 11:59:33 -06:00
Jack Nagel
1c99c68594 Allow tests to be specified in the DSL
Tests can now be specified as a block in the DSL. A temporary test
directory is set up automatically when calling Formula#test. The
semantics of the test remain the same: the block can either raise an
exception or return false to signal failure.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-01-06 21:22:31 -06:00
Adam Vandenberg
896f53d78b Document HOMEBREW_BROWSER and BROWSER 2013-01-06 17:33:52 -08:00
Adam Vandenberg
30114c4c70 brew update: warn about adamv/homebrew-alt 2013-01-06 17:06:38 -08:00
Alex Reece
6672ef5f9f Add support for external ocaml deps via opam
Closes Homebrew/homebrew#16280.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-01-04 21:50:31 -08:00
Adam Vandenberg
2a40ff08a2 Only add -F if the frameworks folder exists
Closes Homebrew/homebrew#16901.
2013-01-04 21:30:10 -08:00
Adam Vandenberg
4bcdb8aeb3 audit: remove silly audit, remove duplicate audit 2013-01-04 09:30:57 -08:00
Adam Vandenberg
a0d53f7bc1 audit: check conflict names 2013-01-03 11:22:31 -08:00
Adam Vandenberg
a5e969dfb5 superenv: make HOMEBREW_FILE available
Superenv scripts have a stripped PATH, which may not include
the brew binary itself. Make this explicitly available to
superenv scripts.

Fixes bsdmake wrapper.

Closes Homebrew/homebrew#16805.
Closes Homebrew/homebrew#16846.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-01-03 09:14:36 -08:00
Jack Nagel
7a4facae2f Guess system XQuartz version when mdfind fails
Fixes Homebrew/homebrew#16857.
2013-01-02 23:20:06 -06:00
Mike McQuaid
05f29e7463 brew-pull: add missing require. 2013-01-02 21:27:23 +00:00
Mike McQuaid
0151bf9b14 brew-pull: cleanup installation options. 2013-01-02 21:14:03 +00:00
Mike McQuaid
755a2fbe52 Add caveats class and use in brew info.
Probably a better approach than reverted e721c7.

Fixes Homebrew/homebrew#16604.
2013-01-02 09:28:15 +00:00
Mike McQuaid
da0c0ae97a Cleanup FormulaInstaller caveats. 2013-01-02 09:28:15 +00:00
Mike McQuaid
df2cdc681a Add Apache version style test. 2013-01-01 17:30:57 +00:00
Cyril Scetbon
4fc76a67d4 Add Apache version style.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-01-01 17:30:52 +00:00
Mike McQuaid
f25e7de43b Add --homebrew-developer flag 2013-01-01 16:39:06 +00:00
Jack Nagel
de1eabf22c Fix some doublethink in the Xcode module
Xcode.prefix and Xcode.installed? use slightly different heuristics to
find Xcode. In fact, .installed? basically duplicates a portion of the
.prefix logic. In practice, the methods results are usually consistent,
but .installed? does not handle non-standard prefixes if mdfind cannot
locate Xcode (for example, if the user has disabled Spotlight indexing).

Since .installed? is essentially a subset of the .prefix logic, we can
rely on the result from .prefix instead.

Fixes Homebrew/homebrew#16790.
2012-12-30 19:23:53 -06:00
Jack Nagel
9362a7c897 Respect BROWSER environment variable 2012-12-27 23:41:44 -06:00
Misty De Meo
1bce10ad6c Replace sceaga/homebrew with mistydemeo/tigerbrew
@sceaga has discontinued his homebrew fork, so tigerbrew is now PPC/
Tiger users' best bet.
2012-12-27 21:55:15 -04:00
Misty De Meo
d6299af86c utils: replace shell which with native code
Originally written for tigerbrew, but useful enough for core.
Replaces the shelled-out which in utils.rb with a native-ruby
equivalent, which is moderately faster.

Closes Homebrew/homebrew#16659.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-12-27 19:37:21 -04:00
Jack Nagel
9c8a73cf41 Allow requirements to specify env options 2012-12-26 14:37:03 -06:00
Jack Nagel
f8d253950f Add a small DSL for setting requirement options 2012-12-26 14:37:02 -06:00
Jack Nagel
a358bee8e2 Clean up BuildEnvironment interface a bit 2012-12-26 14:37:02 -06:00
Mike McQuaid
49ac4f2f6a brew-test-bot: don't return success from git function 2012-12-25 19:20:20 +00:00
Mike McQuaid
b4127c6e40 brew-test-bot: more Jenkins fixes and cleanup.
* Remove the unused HTML and commenting features.
* Return a good status code.
* Print command output on failure.
* Test bottle installation.
2012-12-22 21:21:42 +00:00
Jack Nagel
a56a0dadad Try to find XQuartz via pkgutil if mdls fails
c.f. Homebrew/homebrew#16296.
2012-12-22 14:27:22 -06:00
Jack Nagel
d2d4813a07 doctor: add helper for printing file listings 2012-12-22 12:48:53 -06:00
Jack Nagel
4e9128aa6c doctor: f.prefix is already a pathname 2012-12-21 19:33:24 -06:00
Jack Nagel
2b47739822 doctor: print offending paths in check_for_gettext
c.f. Homebrew/homebrew#16688.
2012-12-21 18:03:24 -06:00
Jack Nagel
847547167a doctor: rename path_folders to paths 2012-12-21 17:16:57 -06:00
Jack Nagel
1780855023 doctor: use a more rubyish conditional 2012-12-21 17:14:01 -06:00
Jack Nagel
73a206a316 doctor: avoid pointless creation of pathname object 2012-12-21 17:12:00 -06:00
Jack Nagel
a64e9e542f doctor: run slowest checks last 2012-12-21 15:15:42 -06:00
Jack Nagel
43108e42d9 Make "XQuartz is installed" heurstic stricter 2012-12-21 12:55:38 -06:00
Charlie Sharpsteen
89b5ee6295 brew-pull: Don't pipe diff stats through the pager
Pass the `--no-pager` flag to git when grabbing a diff summary for a patch as
there is no good reason to invoke a pager for ~2-10 lines that the user must
then exit manually.
2012-12-19 12:42:44 -08:00
Jack Nagel
1e51ccb30d cleanup: fix 1.8.6 compatibilty issue
Fixes Homebrew/homebrew#16655.
2012-12-19 12:00:25 -06:00
Charlie Sharpsteen
93dca5fb38 upgrade.rb: Generate Tab from Keg not Formula
Two issues were preventing `brew upgrade` from functioning properly:

  - `Tab.for_formula` was used to recover options from prior installs. The
    problem is that during an upgrade `for_formula` will be directed to a
    non-existant install of the newer version and thus returns a forged tab
    claiming no options were invoked.

  - The assignment to `installer.install_bottle` requires parenthesis in order
    to function properly.
2012-12-18 15:12:10 -08:00
Jack Nagel
3dcce70a6a Better reporting for MacPorts/Fink installations
closes Homebrew/homebrew#15853.
2012-12-17 17:18:22 -06:00
Jack Nagel
68d1dfe5d7 Revert "Add launchctl_instructions method"
This code makes assumptions about the existence of prefix which are
valid in the context of the installer, but not necessarily in the
context of `brew info`, thus `brew info` on an outdated formula errors
out.

This reverts commit e5b53dd64b769b67805d1054d906f7083939d905.
2012-12-16 19:56:15 -06:00
Lorenzo Manacorda
d23366ae9a Add launchctl_instructions method
Closes Homebrew/homebrew#16604.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2012-12-16 23:31:30 +00:00
Mike McQuaid
3eedfd8024 brew test-bot: handle dependencies better. 2012-12-16 19:39:54 +00:00
Mike McQuaid
7ed19d4c62 Check if Cellar and Cache exist before cleaning. 2012-12-16 19:15:18 +00:00
Mike McQuaid
7d61bfe88f Add another Erlang version format. 2012-12-16 14:35:41 +00:00