646 Commits

Author SHA1 Message Date
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
Max Howell
82c58bb615 Fix doctor hanging if xcode-select is bad
Also fix typo in the superenv DEVELOPER_DIR set detection code.
2012-09-24 08:49:58 -04:00
Max Howell
bcf0d6f245 superenv: Remove HOMEBREW_PREFIX/bin from PATH
We add the bins from all deps instead. Rationale: formula find and use eg. GNU-coreutils versions of things and then break. Only allow formula to use tools that they depend on and expect.

I want to go further and only add include paths etc. for dependencies, I have done some work on this, but I fear it may be impossible. If an include path is eg. /usr/local/lib/foo/include, is it possible to know if this path is bad? Not always AFAICT.
2012-09-23 21:26:50 -04:00
Max Howell
4973329a60 brew cleanup -n: less scary 2012-09-22 00:29:17 -04:00
Max Howell
6e4a01c70a brew --env: Use fetch rather than []
Because we mess with the return value from [] in superenv due to many formula assuming CFLAGS etc. would not be nil.
2012-09-21 23:30:34 -04:00
Jack Nagel
5ebf0416ce cleanup: look for "HEAD", not "sha" in receipt
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-20 16:47:00 -05:00
Max Howell
24b4d445cf Provide more information about bad sf urls 2012-09-18 16:27:35 -04:00
Misty De Meo
2f2645e962 info: Add JSON output
Output JSON with the --json=v1 option. Output is in an array, and
supports one or more formulae (or all, with the --all option).

Why 'v1'? The format is unstable, presumably we'll deprecate it
someday. It should be solid by Homebrew 1.0.

Closes Homebrew/homebrew#13299.
2012-09-17 20:01:37 -05:00
Misty De Meo
3473bbc010 Make check for stray developer dir more specific
It looks like there can be harmless stuff leftover in
/Developer/Library, even after Xcode uninstalls older versions. The
existence of the uninstall-developer-folder script should be a better
indicator.

Fixes Homebrew/homebrew#14970.
2012-09-16 14:07:38 -05:00
Misty De Meo
e8c372a315 Skip standard compilers check for unknown Xcode
Rescuing false on the StandardCompilers map meant that the doctor
check assumed that the compilers were incorrect, not merely
unknown.

Instead, skip the check and return nil for unknown Xcode; nil
should be interpreted as "dunno", instead of "true" or "false",
and the doctor check no longer prints on nil.
2012-09-14 17:11:51 -05: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
Misty De Meo
93502785c4 --prefix: don't use opt prefix if it doesn't exist 2012-09-13 10:19:11 -05:00
Misty De Meo
0329307770 doctor: Add check for stray pre-4.3 Xcode files
/Developer/Library shouldn't exist if all the remnants of old
Xcode versions have been uninstalled, and tends to cause problems if
it's kept alongside modern Xcode.

"uninstall-developer-folder" should only remove /Developer/Library.
2012-09-13 10:18:21 -05:00
Misty De Meo
5ce864176a edit: create project view with subl, too
Sublime Text's subl tool supports lovely project views just the same
as TextMate. Since I use Sublime, I want good support from `brew
edit` too. :P
2012-09-13 09:39:33 -05:00
Adam Vandenberg
e4d6de0abc Add skip_clean :all to audit 2012-09-13 07:14:45 -07:00
Max Howell
dd917bc105 Use opt prefix for --prefix
Rationale: everyone thinks it points to the currently installed prefix, not the prefix of the formula that is newest and maybe not installed.

The previous behavior was unintentional and evidence proves it is not intuitive either.

I anticipate no regressions. And hope I am right!
2012-09-12 22:09:46 -04:00
Jack Nagel
3d6552f8e3 Remove dead code
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-11 14:56:25 -05:00
Jack Nagel
86b2307791 test: be less eager to set up the build environment
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-11 14:47:06 -05:00
Jack Nagel
1c22f03850 cleanup: skip rm_DS_Store during a dry run
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-11 14:41:01 -05:00
Jack Nagel
d5299f4946 cleanup: allow --force to remove keg-only brews again
Fixes Homebrew/homebrew#14840.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-11 14:29:33 -05:00
Jack Nagel
95acaeb98f Audit check for old MacOS version methods
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-10 16:40:13 -05:00
Jack Nagel
192e6e052c audit: allow some forms of gist patches
The problem is not the raw URLs, but URLs that do not contain the commit
hash corresponding to a particular version of the gist.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-06 20:47:05 -05:00
Jack Nagel
b20c35cf0e doctor: ignore case when checking PATH for config scripts
Fixes Homebrew/homebrew#14752.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-06 10:05:49 -05:00
Adam Vandenberg
6a131ced3f Remove fink/macports from verbose --config if they are not present. 2012-09-05 22:07:35 -07:00
Adam Vandenberg
fabc7eb992 audit: swig is a build time dep 2012-09-05 21:12:08 -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
Jack Nagel
35a99c240a Audit check for MACOS_VERSION
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-04 18:18:14 -05:00
Adam Vandenberg
f589644aa4 Exempt automake from some audits 2012-09-04 10:43:48 -07:00
Adam Vandenberg
26f887d4ab add audit for ENV.x11 2012-09-03 19:49:33 -07:00
Max Howell
adc158412c Undent doesn't like paragraphing 2012-09-03 15:12:30 -04:00
Mike McQuaid
0b3327b862 brew-audit: recommend SHA1 over MD5. 2012-09-03 11:20:07 -07:00
Mike McQuaid
a22e60ee8c brew-fetch: Return error code on unmatched hash. 2012-09-03 11:20:07 -07:00
Adam Vandenberg
31d70b5c33 Fix the name because adamv doesn't know what he's doing. 2012-09-01 19:01:56 -07:00
Adam Vandenberg
788b556a3e bless alanthing/homebrew-apachemod
Add external tap to default search path, and recommend it for packaging
Apache Modules.
2012-09-01 18:51:39 -07:00
Jack Nagel
8c55acacb4 brew list -v means verbose, not versions
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-01 13:28:30 -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
Max Howell
8a9073fa42 Set VERBOSE and HOMEBREW_LOG in brew sh 2012-08-31 14:12:28 -04:00
Max Howell
30b53cf92a Cram GL headers and includes into superenv
Fixes Homebrew/homebrew#14554.

We justify doing this because pre 10.8 X11 came with GL for all Homebrew-capable systems and as such is a default that we'd prefer not to have to address.
2012-08-31 14:12:28 -04:00
Max Howell
b98c4792d0 Doctor check for unlicensed Xcode
Checking the license text is probably the most future proofed method. Though for future reference other possible methods are listed in the below ticket.

Closes Homebrew/homebrew#14558.
2012-08-31 10:22:11 -04:00
Max Howell
d39b7b6b99 brew --env puts HOMEBREW_SDKROOT 2012-08-31 10:22:10 -04:00
Max Howell
113ed85e8d More brew irb examples 2012-08-31 10:22:10 -04:00
Max Howell
e7c05f558b String.f convenience function for brew irb
eg. "ack".f
2012-08-30 22:54:45 -04:00
Jack Nagel
20fdc5cd2f Simplify brew outdated even further
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-30 20:39:46 -05:00
Max Howell
bdd6193587 brew sh: a shell with superenv loaded
If you need to build software on OS X by hand, a brew shell is the way to do it.

Closes Homebrew/homebrew#14381.
2012-08-29 12:41:38 -04:00
Max Howell
b834027b17 Doctor suggest git clean -f if unstaged files
This is safe, I tested various scenarios, including Homebrew installed in ~. The only files that are removed are unexpected files in Homebrew's already managed directories.
2012-08-29 12:41:37 -04:00
Max Howell
672388d4f7 Always find git and svn without trying hard
Two wrapper scripts that find git and svn using the ENV variables we support and then searching through the PATH and looking inside Xcode.app if necessary.

Now just calling git or svn in Homebrew code will find and exec the right tool and we can stop fussing.

Apologies to @adamv who is probably unimpressed that the cmds directory has non-commands in it now. If it's consolation these are temporary pending some more work on superenv whereby some more directories are created under the superenv root.
2012-08-29 12:41:36 -04:00
Max Howell
fb8c7e0aaf Allow eg. brew --env libxml2
Example useful usage:

    eval $(brew --env gettext) && clang -Wl,-t -lssl 2>/dev/null
2012-08-29 12:41:35 -04:00
Max Howell
65d195dcaa superenv: build-environments that just work
1. A minimal build environment, we don't set CFLAGS, CPPFLAGS, LDFLAGS, etc. the rationale being, the less that is set, the less variables we are introducing that can break builds.
2. A set of scripts that replace cc, ld, etc. and inject the -I, -L, etc. flags we need into the args passed to the build-tools.

Because we now have complete control over compiler instantiations we do a variety of clean-up tasks, like removing bad flags, enforcing universal builds and ensuring makefiles don't try to change the order of library and include paths from ones that work to ones that don't.

The previous ENV-system is still available when --env=std is specified.

superenv applies to Xcode >= 4.3 only currently.
2012-08-29 12:41:34 -04:00
Max Howell
05b91e3d29 Figure out if we can cleanup keg-only kegs 2012-08-29 12:41:33 -04:00