38 Commits

Author SHA1 Message Date
Simon Sigurdhsson
8000fb807f Doctor check for origin
Added checks on doctor.rb for:

* Missing git origin
* git origin not pointing at mxcl/homebrew

Tests use `git config --get remote.origin.url`.
Also added printout of origin to --config.rb.

Fixes Homebrew/homebrew#14399.
Closes Homebrew/homebrew#17117.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-01-17 17:18:15 -06:00
Jack Nagel
3dcce70a6a Better reporting for MacPorts/Fink installations
closes Homebrew/homebrew#15853.
2012-12-17 17:18:22 -06: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
Max Howell
cddc3649a7 Safer way to redirect puts to a file 2012-09-28 09:49:05 -04:00
Max Howell
7a75915345 Only handle build-errors when it's a build-error
Refs Homebrew/homebrew#15164.
2012-09-28 09:37:38 -04:00
Jack Nagel
2761d3ee49 Restore X11 description to --config output
Oops.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-14 12:29:51 -05:00
Jack Nagel
3d6552f8e3 Remove dead code
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-11 14:56:25 -05:00
Adam Vandenberg
6a131ced3f Remove fink/macports from verbose --config if they are not present. 2012-09-05 22:07:35 -07:00
Jack Nagel
aeab8e8d19 Improve brew --config responsiveness
Rather than build the whole output in a string, print each item as we
go. This gives the illusion of improved responsiveness by delaying the
expensive method calls until after the faster output.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-05 16:41:35 -05:00
Max Howell
3935a34048 brew -c1 one line configuration summary
At your option: `brew --config -1`.
2012-08-31 15:48:48 -04:00
Jack Nagel
120ce10730 --config: remove confusing XQuartz annotation
Apple's X11 is XQuartz, but this can be confusing, and is ultimately
unnecessary for debugging purposes.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-14 15:04:55 -05:00
Jack Nagel
7488b9844b Adjust XQuartz/X11 module naming scheme
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-06 00:39:06 -05:00
Jack Nagel
148617bc11 Move X11 machinery into MacOS::XQuartz namespace
In order to better support Xcode-only systems, where X11 libs and
executables live under /usr/X11 but headers live in the SDK, move the
x11_* helper methods into a new module.

This allows us to keep some of the CLT/Xcode-only and Apple X11/XQuartz
logic hidden from outside code, like ENV.x11.

Since Apple's X11 is actually XQuartz, name the module "MacOS::XQuartz".
2012-08-01 00:31:38 -05:00
Jack Nagel
62482504a9 Split Xcode and CLT methods into separate modules
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-25 11:58:01 -05:00
Jack Nagel
a8c05c9772 Restore some things to failed install config dump
Closes Homebrew/homebrew#11091.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-08 12:27:19 -05:00
Jack Nagel
1478615429 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
63d77ac6de 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
Camillo Lugaresi
89f86dc283 Better describe X11 in brew --config 2012-07-01 12:20:47 -05:00
Jack Nagel
87543a6916 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
9189258a9e Clean up --config output
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-26 00:02:42 -05:00
samueljohn
725feb3db1 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 Homebrew/homebrew#10510.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-06-24 19:11:06 -07:00
Misty De Meo
7af4622b0f Replace /usr/bin/ruby with full Framework path
Rationale: some users insist on replacing the /usr/bin/ruby symlink
to point to another ruby on their system, which may break homebrew.
Use the full Framework path instead, which is less likely to be tampered with.

This also reorganizes the brew --config checks to reflect the different path.

Fixes Homebrew/homebrew#12009.

Closes Homebrew/homebrew#12333.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-06-01 09:24:25 -05:00
Jack Nagel
210c9ac205 Use 'which' helper method more
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-13 19:28:03 -05:00
Jack Nagel
0aea8d39e6 Fix typo in --config.rb
Closes Homebrew/homebrew#11183.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-24 12:11:37 -05:00
Max Howell
2c84be96d8 Concise --config output for build errors
Rationale, lets only pay attention to the output when it matters. Speeding up diagnosis.
2012-03-16 21:06:16 +00:00
Max Howell
fb9b263bc3 Play nice with case-sensitive filesystems 2012-02-29 01:28:23 +00:00
Jack Nagel
f74e616724 Show real path to x11 in --config output
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-27 23:43:56 -06:00
samueljohn
0eb1cadee0 brew --config: properly handle empty which strings
Symptom: If no python/ruby/perl is in your path, then `which x`.chomp
returns an empty string and `unless ""` is still true.  So, N/A is never
displayed.  Instead, ruby's Pathname.new("").realpath returns the cwd.
(I consider this realpath behavior a ruby bug) Fix: use empty?

Closes Homebrew/homebrew#10027.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-08 14:41:55 -06:00
Adam Vandenberg
8fe17772bb Show which Perl, Python and Ruby are in the path. 2012-02-02 19:10:56 -08:00
Jack Nagel
d106cfed06 Make MacOS.clang_build_version more useful
Let's choose the first \d{2,} as the build number, as it is the most
likely to indicate significant changes, and we need something to use for
comparison when selecting compilers.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-11 02:19:09 -06:00
Jack Nagel
647e7f1126 config: prettify sha method
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-12-28 19:54:59 -06:00
Adam Vandenberg
4b7b2a17da Clean up --config 2011-12-21 10:47:44 -08:00
Adam Vandenberg
0fd47f2014 brew-config: remove recommended compiler versions
The recommended compiler versions printed from `brew-config` are out
of date and misleading. The recommendation is always "Run the latest
version of Xcode available for your platform".
2011-11-25 17:34:47 -08:00
Jack Nagel
265ea4d1fb Display clang version in --config output
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-25 13:15:47 -06:00
Mike McQuaid
f8127143cf Create method for accessing Xcode version. 2011-05-18 17:04:00 +01:00
Adam Vandenberg
6d7f608d06 remove whitespace 2011-03-26 10:19:45 -07:00
Max Howell
e9aa22be8f Don't throw if no gcc 4.0 installed 2011-03-12 11:55:05 -08:00
Max Howell
768910283a Refactor the brew command into one file per command
The code was sucking. To the extent that maintenance was hard. It's a lot
easier to work with code that is sensibly split at sensible boundaries. So
now it is more like that.

But the refactor is minimal. Because we don't want you to have more merge
hell than absolutely necessary.

If you merge you will need to pay attention to brew.h.rb (as it is deleted)
and bin/brew (as command logic is gone). It will be painful, but you will just
have to help git out by moving any changes around manually.

Note compatibility.rb. It ensures that any function renames or removals don't
break anything. We're pretty serious about backwards compatibility. And that's
because we encourage you to hack around with the innards. And we couldn't do
that if we would then just make stuff disappear behind your back.
2011-03-12 11:55:02 -08:00