Commit Graph
473 Commits
Author SHA1 Message Date
Mike McQuaid b8ec7268ee Fix brew doctor warnings and spurious newline.
Fixes the problems discussed in 34c970 to ensure that `brew doctor`
does not look like it is broken on user setup problems but still
returns a sensible exit code for e.g. BrewBot.
2012-07-25 22:54:44 +01:00
Jack Nagel 6d528e94bb Rename xctools_fucked?
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-25 12:04:42 -05:00
Jack Nagel 6a79970355 Use new Xcode module
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-25 12:04:41 -05:00
Jack Nagel 68fee2a11a Split Xcode and CLT methods into separate modules
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-25 11:58:01 -05:00
Adam Vandenberg 3053cbc044 doctor: be consistent in path advice 2012-07-24 12:28:02 -07:00
Adam Vandenberg ecb09ba396 doctor: check for DYLD_FALLBACK_LIBRARY_PATH 2012-07-23 16:08:05 -07:00
Misty De Meo 68caf03faa doctor: Skip outdated check when offline
Fixes #13535.
2012-07-22 12:57:03 -05:00
Misty De Meo 66a4ea1c80 Keg#unlink: check destination before unlinking
Rather than skip unlinking if there's no linked keg record, check to
see whether the destination's realpath is the same as the source file
in the keg being unlinked.
2012-07-22 10:58:19 -05:00
Misty De Meo 365508f221 brew unlink: don't unlink an unlinked formula
This caused weird issues in the case that multiple formulae provide
the same file.
2012-07-20 11:00:48 -05:00
Misty De Meo a957528943 Update Xcode checks for 10.8 2012-07-12 14:34:00 -05:00
Jack Nagel 11963f038a doctor: fix incorrect usage of 'or'
Eventually I will stop making this mistake.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-12 03:01:28 -05:00
Adam Vandenberg 40a944e58f use keg.linked? 2012-07-11 20:13:46 -07:00
Misty De Meo c3285f69b0 ARGV: add .dry_run? method
Add an ARGV.dry_run? helper method for '--dry-run'/'-n' now that
'-n' is being used as a git-style dry-run in two commands.

Closes #12898.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-07-09 12:01:09 -05:00
Misty De Meo bf051054b6 link: add --force and --dry-run options
`brew link` can now be made to delete any conflicting files using
the --force argument. It also has a --dry-run option, similar to
git clean -n, which will list any files which would be deleted
without touching the filesystem.

Closes #11811.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-07-09 12:01:09 -05:00
Jack Nagel 96de6f072d Restore some things to failed install config dump
Closes #11091.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-08 12:27:19 -05:00
Jack Nagel ad4d524b2c Display compiler build numbers in config dump
But only display them if they are out of sync with the corresponding
Xcode version.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-08 12:26:10 -05:00
Jack Nagel ecae65f775 Always output X11 version and path in config dump
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-08 12:16:53 -05:00
Jack Nagel ed975b1280 fetch: remove dead code
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-08 10:47:57 -05:00
Adam Vandenberg eef917b3d8 doctor: update xcode chceck
* 4.3.3 is the latest on 10.7
* Give up if we don't know what the latest is (10.8 and beyond)
2012-07-07 11:59:01 -07:00
Jack Nagel 886f64a53c Give SoftwareSpec an initializer
Tools like `brew create` need to create and manipulate SoftwareSpec
objects. It is useful to be able to do this directly, rather than by
proxy through the special methods that serve the main formula DSL.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04 22:47:35 -05:00
Jack Nagel f6a67ea017 Teach download strategies to take a SoftwareSpec
Now that a URL, version, and the (for lack of a better term) "specs"
associated with said URL (e.g. the VCS revision, or a download strategy
hint) are neatly bundled up in a SoftwareSpec object, it doesn't make
sense to pass them individually to download strategy constructors. These
constructors now take only the formula name and a SoftwareSpec as
parameters.

This allows us to move mirror handling out out of Formula#fetch and into
the download strategies themselves. While doing so, we adjust the mirror
implementation a bit; mirrors now assume the same "specs" as their
owner's URL. They are still only useable by the CurlDownloadStrategy,
but this provides a basis for extending mirror support to other
strategies.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04 22:47:35 -05:00
Jack Nagel 96f396c9d4 fetch: use new checksum verification
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04 22:47:34 -05:00
Jack Nagel 078cfc5158 Refactor download strategy detection
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04 22:47:34 -05:00
Jack Nagel 0c18ffd7fa Refactor checksumming
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04 22:47:33 -05:00
Jack Nagel 3642b5b4f4 audit: handle new formula specs 2012-07-04 22:47:33 -05:00
Jack Nagel 94d0f237f1 info: display available formula specs 2012-07-04 22:47:33 -05:00
Jack Nagel 23c074206b fetch: make use of new formula specs 2012-07-04 22:47:33 -05:00
Jack Nagel d68131523b Update formula template for new X11 dependency
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-01 14:32:28 -05:00
Jack Nagel 1bf2742b56 Dump Cmake environment variables in brew --env
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-01 13:51:23 -05:00
Jack Nagel a3aa586944 Update doctor checks for XQuartz
- pkg-config no longer defaults to checking /usr/X11/lib/pkgconfig;
   instead this path is added via ENV.x11 or depends_on :x11. Formulae
   that expect X11 libs should be explicitly marked as depends_on :x11.
 - Remove warning about /usr/X11 as a symlink.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-01 12:23:19 -05:00
Camillo Lugaresi 0a84bf674d Better describe X11 in brew --config 2012-07-01 12:20:47 -05:00
samueljohn 8f676a8271 doctor: suggest the correct xcode-select path to the user
Shortened the part about the CLT-only systems, because this message is
never shown to them.

Closes #13061.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-29 12:40:26 -05:00
samueljohn 9c82fc29cd Fix #13012 properly and don't set the SDK if CLT
Undoing parts of the hot fix 78b9e8548e.

The only thing missing was to check for `system "/usr/bin/xcrun -find make 1>/dev/null 2>&1"`
and then it's safe to call locate.

This commit restores the original functionality but without the risk for recursion
and improves the logic of `MacOS.locate`. See below.

To important changes in this commit:

- For Xcode _and_ CLT: don't add the SDK and leave things as before.
So if `MacOS.clt_installed?`, then no `SDKROOT` and `-L` and `-I`
directories are set in `ENV.macosxsdk`.

- Improved the logic for `MacOS.locate` for Xcode-only situations
by assuring that the xcode-select path is correct. This is done
by checking that `bin/make` exists and is executable. Otherwise it
was possible to set xcode-select to an empty dir.
This check is done in `MacOS.sdk_path` too.
We are now able to use Xcode wherever it is and can work even, if
xcode-select is set to invalid values. (Remember some users don't
have sudo access and that is needed to fix xcode-select).

Some minor whitespace fixes.
Minor backtick fix in doctor.rb's printout.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-06-27 11:50:43 -07:00
samueljohn 8b5c5910e2 doctor: check for ~/.pydistutils.cfg
Closes #12363.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-26 19:41:22 -05:00
Jack Nagel 9aca25c32e config: omit Xcode path for CLT-only systems
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-26 12:20:04 -05:00
Jack Nagel b0cc25007a Clean up --config output
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-26 00:02:42 -05:00
Charlie Sharpsteen b9d370084e brew-upgrade: Respect --ignore-dependencies flag
Passing `--ignore-dependencies` to `brew upgrade` will now have the desired
effect.
2012-06-25 09:20:18 -08:00
samueljohn 3c52a3050e Core change: XCode only install, with CLT or both
Allow XCode without the Command Line Tools to
work with homebrew, so it's not necessary
to register an Apple Dev ID and/or go to the
XCode prefs and download the CLT. Yay!

Further, this commit allows to use the CLT
solely (without the need for XCode).
Saves quite some megs.
(Some furmulae require xcodebuild)

Of course XCode together with the CLT is still
fine and has been tested on 10.7 and 10.6
with Xcode 4 and Xcode 3.

Only on Lion or above, tell the user about the options,
which are
- Xcode without CLT
- CLT without Xcode
- both (ok, it's not directly stated, but implicit)
So if no Xcode is found and we are on Lion or above,
we don't fail but check for the CLTs now.
For older Macs, the old message that Xcode is needed
and the installer should be run is still displayed.
If the CLT are not found but Xcode is, then we
print out about the experimental status of this setup.

Closes #10510.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-06-24 19:11:06 -07:00
Tim Oram b4feaa27c0 doctor: rewrite Volume class to fix issue with google update engine
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-06-23 10:18:16 -07:00
Misty De Meo 4ed3c71d1d doctor: skip missing_deps when no Cellar exists
Another fix for #5188.
2012-06-19 10:08:19 -05:00
Misty De Meo 9fa496bf1a doctor: skip outdated_homebrew check when no git 2012-06-19 10:03:11 -05:00
Misty De Meo 046498b72f doctor: don't warn about recent MacGPG2 versions
Fixes #12238.
2012-06-19 09:25:18 -05:00
Misty De Meo 771827032f doctor: skip Cellar test if Cellar doesn't exist
Fixes #5188 (again).
2012-06-19 09:24:59 -05:00
Jack Nagel d5792c8946 audit: prefer ARGV.build_head? to inspecting 'version'
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-17 18:01:22 -05:00
Jack Nagel 0bfe48f5d3 audit: prefer modifying ENV to using env or export
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-17 17:59:30 -05:00
Jack Nagel 910e5013ab audit: catch unnecessary 'ENV.foo' interpolation
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-17 17:58:49 -05:00
Misty De Meo 92d373aad5 doctor: Mono-specific warning for pkg-config
Mono installs its own pkg-config symlink into /usr/bin/pkg-config,
which breaks non-Mono builds. Provide a specific warning.

Closes #12859.
2012-06-17 12:17:11 -05:00
Adam Vandenberg cfe642bfd4 Fix doctor's use of missing.
`brew doctor` shelled to `brew missing` and parsed the results.
When VERBOSE was true, this caused an error as extra, unexpected
output is generated.

Make missing an internal command, and give it a programmatic interface.
2012-06-12 20:03:26 -07:00
Jack Nagel 79772aa31d Use which method in doctor
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-12 00:17:36 -05:00
Adam Vandenberg ff96f4cd9f Use sha1 as the default checksum for new formulae
See: https://github.com/mxcl/homebrew/pull/12587
2012-06-06 07:04:51 -07:00