469 Commits

Author SHA1 Message Date
Misty De Meo
4dc1a7bdce brew doctor: add check for outdated compilers
A common source of build problems on Xcode 4.3+ is outdated compilers,
usually when a user has installed over top of an old version and hasn't
installed the CLT. Since the compilers from the previous Xcode are still
around, brew doctor wouldn't complain.

This adds a hash containing a list of the canonical compiler versions
for supported versions of Xcode, and adds a check against that to determine
whether a given installation has any compilers which are out of date.

Closes Homebrew/homebrew#11518.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-04-11 10:08:46 -05:00
Misty De Meo
c134ba6c4a doctor: be specific about libiconv files detected
Closes Homebrew/homebrew#11417.
2012-04-09 13:19:42 -05:00
Misty De Meo
c9fd1b9bf0 doctor: skip Cellar checks if Cellar doesn't exist
Attempting to call certain methods on the Cellar before it exists,
such as realpath, would cause brew doctor to throw unnecessary "file
does not exist" errors. This was fixed once before, but new tests
have been added since without the appropriate checks.
cf. 0d28bc78d71590c8e8a5961d8d10e3d7d9b8822d

Fixes Homebrew/homebrew#5188 (again).
2012-04-08 15:50:16 -05:00
Rory O’Kane
c2ca1773c5 doctor: fix typos
Closes Homebrew/homebrew#11418.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-03 16:21:01 -05:00
Mike McQuaid
0cbdeeaa3c Exit with bad exit code on command failures. 2012-03-29 18:44:37 +11:00
Adam Vandenberg
23664db4d7 brew doctor: check for trailing slashes in path
Having path directories with trailing slashes can cause other false
warnings.

Closes Homebrew/homebrew#9986.
2012-03-21 22:03:21 -07:00
Jack Nagel
76c86d1ac8 Update missing Xcode advice
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-21 12:47:51 -05:00
Jack Nagel
fa837edcbb Update Xcode version checks
Closes Homebrew/homebrew#11044.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-20 19:06:59 -05:00
Mike McQuaid
23b84ef732 Set MACOS_VERSION as 0 on non-OSX platforms. 2012-03-18 15:43:39 +13:00
Max Howell
d01e9a8fd7 Don't warn about .DS_Store
Fixes Homebrew/homebrew#11018.
2012-03-18 00:16:09 +00:00
Adam Vandenberg
1cdd35b7e8 doctor: check OS version
We warn if you are not running the latest Leopard or Snow Leopard.
(We do not currently check Lion or Mountain Lion versions.)
2012-03-17 11:56:32 -07:00
Max Howell
15f3e9ea77 Doctor check for unlinked not-keg-only brews
Since these cause trouble.
2012-03-16 21:06:17 +00:00
Max Howell
a42714ce82 Improve CLI tools suggestion doctor text 2012-03-16 01:03:24 +00:00
Max Howell
e0a8ddcd1e Warn about broken symlinks in HOMEBREW_PREFIX
Refs Homebrew/homebrew#10874.
2012-03-16 00:20:49 +00:00
Michael Nygard
74c2fc8279 Remove invalid character for UTF-8
Closes Homebrew/homebrew#10962.

Signed-off-by: Max Howell <max@methylblue.com>
2012-03-15 16:05:04 +00:00
Max Howell
bf1baa3948 Explicitly tell people not to xcode-select /
Fed up dealing with this bug in xcode-select.
2012-03-15 13:19:43 +00:00
Camillo Lugaresi
c59be1a930 Remove libiconv duplicate
Commit ee2c3ab ("Remove spurious libiconv dependencies") pruned all
existing "depends_on 'libiconv'" usages from Homebrew in preparation for
removing the libiconv dupe itself.

Now that is done, and we can remove and blacklist it. It can be obtained
from Homebrew-alt.

Closes Homebrew/homebrew#10464.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-13 19:38:17 -05:00
Adam Vandenberg
e133cba770 brew doctor: check for DYLD_INSERT_LIBRARIES 2012-03-12 21:14:33 -07:00
Adam Vandenberg
c947dbc580 Use HOMEBREW_REPOSITORY for freshness check
Homebrew itself is found under HOMEBREW_REPOSITORY,
which *may* be the same HOMEBREW_PREFIX, but does not have
to be if you link brew into /usr/local/bin from another location.
2012-03-10 10:08:16 -08:00
Jack Nagel
880f566867 Remove unnecessary hyphen
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-09 13:29:56 -06:00
Mike McQuaid
5f1a9098c9 Add better Unix exit codes.
Closes Homebrew/homebrew#10809.
2012-03-09 19:16:33 +13:00
Max Howell
5b0d97efc7 Suggest full path to Xcode 4.3 /Developer
Some people seem to have an older xcode-select even after installing the CLT from inside Xcode or otherwise. So this is works for both.

Now we aren't future-proofed in case Apple change the location, but hopefully they won't, seems unlikely.

Refs Homebrew/homebrew#10743. Fixes Homebrew/homebrew#10745.
2012-03-07 15:19:30 +00:00
Max Howell
9c5ddb5721 The doctor checks if you need to brew update
Well at least it checks to see if it's been a while since the last one.
2012-03-06 20:28:05 +00:00
Jonathan Hitchcock
de30a7844f 'brew doctor' provides bad example command
If there are multiple dependencies missing, 'brew doctor' can suggest
that you run something like:

  brew install autoconf libyaml autoconf, libyaml

This commit improves that output.

Closes Homebrew/homebrew#10720.

Signed-off-by: Max Howell <max@methylblue.com>
2012-03-06 15:38:33 +00:00
Max Howell
7ddaaf9bb0 Doctor check for python is Python-3
Refs Homebrew/homebrew#9541.
2012-03-06 12:20:02 +00:00
Jack Nagel
caa3c4f864 doctor: make git status check saner
The order of things made the check for git in the path pointless (and
was my fault); this is a better way to do it.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-01 23:29:14 -06:00
Jack Nagel
2d5de8c7ed doctor: s/folder/directory/
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-01 22:55:33 -06:00
Jack Nagel
7f39c999a6 Don't duplicate missing deps in brew doctor
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-01 19:48:37 -06:00
Max Howell
bfa537d5fa Clearer brew doctor output for brew missing
It was confusing that it told you to brew install missing deps and then listed formula that were already installed IMO.
2012-03-02 01:21:55 +00:00
Max Howell
9772e08033 Specify current Xcode to aid issue-diagnosis
I saw a ticket with just doctor output and no `brew --config`. This helps.
2012-03-02 01:06:16 +00:00
Giovanni Bajo
e0eb98c84c Fix xcode check variable name.
Closes Homebrew/homebrew#10624.

Signed-off-by: Max Howell <max@methylblue.com>
2012-03-01 21:59:21 +00:00
Rob Olson
d23b8dc5d3 Fix typo: '/Application' -> '/Applications'
Closes Homebrew/homebrew#10626.

Signed-off-by: Max Howell <max@methylblue.com>
2012-03-01 21:57:58 +00:00
Max Howell
2a559110c2 Don't warn about missing Xcode twice 2012-03-01 17:01:17 +00:00
Max Howell
c21ffc4139 Fix /usr/bin:/usr/local/bin PATH order check 2012-03-01 16:59:18 +00:00
Max Howell
ba9b1f918d The doctor suggests upgrading Xcode
Closes Homebrew/homebrew#9199.
2012-03-01 16:57:14 +00:00
Max Howell
918f2a1f3a Faster and more legible brew doctor
Please check for regressions. I was careful, but there was a lot of stuff.

Closes Homebrew/homebrew#9409.
2012-03-01 16:33:21 +00:00
Max Howell
abe0be8a2e Show doctor error if xcode-select path is invalid
Fixes Homebrew/homebrew#10598.

Ideally we would show a message for builds that use xcodebuild etc. But there is no easy mechanism for this in place.
2012-03-01 10:19:55 +00:00
Max Howell
571aff35e7 Revert "Writability for /usr/local is no longer required"
This reverts commit 21acfc1c7e66babf112196812fdfcf442edf3a97.

This was reverted because we tried to leave /usr/local with root permissions, but
this caused problems for us. Sorry Rogue Amoeba. I'd suggest not installing your
App's tools into /usr/local. It's outside your App's domain, so you can't be sure
what will happen there.
2012-02-28 18:49:40 +00:00
Max Howell
2049ce9f5c Autoconf, Automake and Libtool
We need these now for Xcode-4.3/CLT4X installations.

Also prevent m4 error in installer. And prevent brew doctor complaining if we're Xcode 4.3 or above.

Closes Homebrew/homebrew#10349. Fixes Homebrew/homebrew#10423. Refs Homebrew/homebrew#9179.
2012-02-27 03:35:11 +00:00
Jack Nagel
4ee255134d Replace UI uses of 'folder' with 'directory'
There are still methods and variables with the word "folder" in the
name, but at least user-facing messages and warnings should use the
correct terminology.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-24 19:43:40 -06:00
Max Howell
8cbaca5b76 Fixes Homebrew/homebrew#10369; Doctor output is unreadable. 2012-02-21 15:50:35 +00:00
Max Howell
83e9dbf266 Be more verbose for the /usr/bin /usr/local/bin PATH doctor 2012-02-20 18:25:13 +00:00
Adam Vandenberg
40811ae64c fix download url 2012-02-17 19:45:22 -08:00
Max Howell
1e9a4dbfe4 brew doctor whines at people to install CLI Tools for Xcode
Refs Homebrew/homebrew#10290.
2012-02-18 01:53:54 +00:00
Max Howell
b5268a877e Remove OSX-GCC from brew-doctor
Also fix undesired output if git isn't installed.

Refs Homebrew/homebrew#10244.
2012-02-17 00:07:09 +00:00
Jack Nagel
59bd97bb89 Unset CLICOLOR_FORCE in the build environment
If we're going to unset GREP_OPTIONS we may as well unset this one too,
as it causes similar issues. Recent autoconf unset both of these.

Fixes Homebrew/homebrew#8165.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-16 16:55:28 -06:00
Max Howell
ec66d1f956 Delete ENV[GREP_OPTIONS] and the related doctor check
Can break CMAKE builds.
2012-02-16 18:19:00 +00:00
Jack Nagel
9e8da81302 doctor: try to detect osx-gcc-installer
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-08 11:51:51 -06:00
Misty De Meo
706da00b72 doctor: remove gcc-4.2 warning on Xcode 4.2+
Re: Homebrew/homebrew#9925, many others.
2012-02-02 14:08:49 -06:00
Jack Nagel
c94e8b380f doctor: reset should be done in HOMEBREW_REPOSITORY
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-24 19:59:24 -06:00