16336 Commits

Author SHA1 Message Date
Adam Vandenberg
47dcc3f770 Cleaner: allow non-empty paths to be pruned from cleaning 2013-01-08 21:27:30 -08:00
Mike Lapinsky
1815e6caa1 Don't remove linked formulas when doing a 'cleanup'
Closes Homebrew/homebrew#16947.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-01-08 09:50:12 -08:00
Jack Nagel
e3068f631a Prune LinkedKegs relative to correct path
Fixes Homebrew/homebrew#16948.
2013-01-08 11:03:13 -06:00
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
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
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
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
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
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
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
Jack Nagel
5ce1caa1f3 Improve Xcode and CLT config reporting
We support three configurations: Xcode-only, CLT-only, and Xcode with
CLT. Our configuration output should correctly reflect this.

While MacOS::Xcode.version has to continue to return a guess if Xcode is
not installed in order to maintain backwards compatibility, this is an
implementation detail that we don't need to expose to the user. And it
makes `brew --config` output confusing.

So let's only print the "Xcode" line when an actual Xcode installation
is present. This makes it easy to quickly figure out which of the three
possible configurations the user is running.

Addresses Homebrew/homebrew#14941, more or less.
2012-12-12 23:33:29 -06:00
Mike McQuaid
fe4e73db32 Fix stupid typo in bottle fix. 2012-12-12 00:47:02 +00:00
Mike McQuaid
584768b93f Disable bottle installation correctly on 10.6. 2012-12-11 23:39:43 +00:00
Jack Nagel
8dafce0d95 Properly escape log filename
Closes Homebrew/homebrew#16485.
2012-12-11 14:01:36 -06:00
Shaun Jackman
9a4567c2f9 pathname.rb: Pass -s to du instead of -d0
The option `du -s` is equivalent to `du -d0`. The former is a POSIX standard
(IEEE Std 1003.1-2008), whereas the latter is a BSD extension.

From the BSD man page:
`-s Display an entry for each specified file. (Equivalent to -d 0)`

From SUSv4:
`-s Instead of the default output, report only the total sum for each of the specified files.`
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/du.html

Closes Homebrew/homebrew#16516.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2012-12-11 09:32:16 -08:00