4632 Commits

Author SHA1 Message Date
Jack Nagel
6af4cc9f27 brew --env: fix path to xcrun
Fixes Homebrew/homebrew#10327.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-19 20:32:06 -06:00
Adam Vandenberg
be250b4d05 don't quit if already installed 2012-02-19 14:07:42 -08:00
Jack Nagel
6feb56ce37 test: returning false indicates failure
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-18 21:33:36 -06:00
Jack Nagel
ccec313b03 audit: use a heredoc for this long line
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-18 20:49:51 -06:00
Jack Nagel
ecbee2b73c audit: tighten xcodebuild SYMROOT check
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-18 20:49:50 -06: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
607c13c32b Find xcrun if user doesn't ever install Xcode 4.3 helper tools 2012-02-17 13:34:06 +00:00
Jack Nagel
856fe669e2 audit: warn about ARGV.include? '--devel'
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-16 23:47:40 -06:00
Jack Nagel
f1dc59ca11 audit: make checksum warnings more clear
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-16 23:47:39 -06:00
Adam Vandenberg
0ae1772b89 audit: add problem counts 2012-02-16 20:27:08 -08: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
Max Howell
4504662033 Use xcrun; Ensure clang is the default compiler with Xcode 4.3
Using xcrun as a proxy to execute the compiler tools is per its design. This means you can't treat ENV['CC'] as a path anymore, but I think I found the cases this was being expected and corrected them. It was not proper anyway to assume the variable was a path, it can be anything. Like a proxy. Like xcrun.

Also more thoroughly clear ENV.
2012-02-16 23:43:43 +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
b63584a386 audit: warn about correct empty checksum type
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-15 23:03:43 -06:00
Jack Nagel
5ab0488918 fetch: compare checksums case-insensitively
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-15 22:34:48 -06:00
Jack Nagel
98dcfcfe2e audit: only look for empty checksums once
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-15 22:12:06 -06:00
Trevor Wennblom
555b16962f more stringent auditing of checksums
Closes Homebrew/homebrew#10213.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-15 22:12:06 -06:00
Jack Nagel
1d9ada295a Boost-jam is now part of boost-build
So remove it, and add/update the appropriate aliases.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-13 20:51:40 -06:00
Jack Nagel
cdd52e28f1 Remove LinkedKegs entry if we're writing the same one
If a keg has been uninstalled via `rm -rf <keg>`, and a user tries to
reinstall it without `brew unlink`ing it first, it will fail to link as
the LinkedKegs entry still exists. This isn't desirable, and the user
should be able to reinstall the same formula on top of the old, dead
symlinks without problems, so let's just remove the LinkedKegs entry if
it matches the one we are installing anyway.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-10 23:53:12 -06:00
Jack Nagel
c1fecab365 Don't return nil from Formula#linked_keg
Doing so was the result of a quick hack to fix the "deps installed as
upgrades don't get linked" bug, but it was a mistake. Instead, always
return the LinkedKegs entry as a Pathname object, and let callers be
responsible for checking that it exists.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-10 23:52:01 -06:00
Jack Nagel
46b80bd552 Revert "install: unlink old kegs"
This reverts commit 2eabe2cbc84649696aeb6fa842a70f3794955597.

When Keg#unlink looks for symlinks relative to the keg, it can hit false
positives that actually belong to a different keg and unlink them
anyway. This breaks our "force identical directory symlinks to be shared
real directory" case.

This may be a problem in general with the unlinking code and should be
investigated.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-10 12:58:24 -06:00
Jack Nagel
511598fa37 install: unlink old kegs
If a formula makes it all the way to the actual install step, it is safe
to unlink the keg before linking; this will prune dead symlinks in the
case where a keg was removed with `rm -rf <keg>` but not unlinked with
`brew unlink`.

Fixes Homebrew/homebrew#10077.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-10 08:57:11 +00: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
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
Jack Nagel
a743f8d862 create: homepage comes before url and checksum
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-06 17:19:54 -06:00
Jack Nagel
1a3a1249bf Warn the user of required arguments
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-04 00:27:05 -06:00
Adam Vandenberg
7ed76725c4 uses: do nothing if no args 2012-02-03 21:40:15 -08:00
Adam Vandenberg
8fe17772bb Show which Perl, Python and Ruby are in the path. 2012-02-02 19:10:56 -08: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
4ce8bdb32c prune: remove info dir entries for pruned files
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-01 22:52:15 -06:00
Jack Nagel
59458eac51 link: add missing newline in verbose mode
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-01 22:52:14 -06:00
Jack Nagel
66388b7a43 create: punt on bad URLs
When we can't detect a name from the URL, just ask the user.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-31 17:57:20 -06:00
Jack Nagel
8809c85cc3 versions: ignore NameError and ArgumentError
Fixes Homebrew/homebrew#9856.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-29 16:00:27 -06:00
Adam Vandenberg
62cfa49082 audit: make boost-jam a build-time dependency 2012-01-28 12:50:45 -08:00
Jack Nagel
8944cc6b66 versions: fix up error handling
Now we handle some things more explicitly and in the process get rid of
the blanket rescue on the mktemp block, which is something of an
antipattern.

By unloading the class *after* determining the version, we avoid the
case where the class had previously been unloaded but Formula.factory
failed, and trying to unload the nonexistent class results in a
NameError. Doing it this way, we avoid having to rescue NameError and
thereby avoid hiding other cases where it may occur.

We also rescue TypeError which gets us past a few more bad formula in
the history in some instances.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-27 03:40:24 -06:00
Jack Nagel
d10f2afbac versions: silence 'aka' warning and syntax errors
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-26 23:02:18 -06:00
Jack Nagel
ab19242d04 audit: reorganize some checks
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-25 22:41:53 -06:00
Jack Nagel
c36561f450 audit: make devel check more specific
There are a few false positives where the string 'devel' occurs in other
contexts.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-25 22:39:13 -06:00
Misty De Meo
d121bcdada Add devel to the DSL, + stable and bottle blocks
This commit adds a `devel` entry to the DSL, allowing formulae to
specify an unstable branch.

`devel` takes a block, which should contain standard `url` and `md5`
fields (and `version`, if necessary). This must come after the standard
DSL fields.

This commit also migrates over all formulae currently using `devel` to
the new syntax, as well as formulae which used `head` for non-VCS urls.

The new syntax is also available for `stable` and `bottle`. `stable` is
an option alongside the old syntax. `bottle` replaces the old syntax.

Note that the @stable ivar in Formula has been renamed to @standard,
and the @bottle ivar has been renamed to @bottle_url.

Closes Homebrew/homebrew#9735.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-01-25 21:45:19 -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
Mike McQuaid
ab31e50574 Make brew doctor reset instructions clearer.
Fixes Homebrew/homebrew#9739.
2012-01-24 19:36:10 +00:00
Dylan Smith
66fbb607fd versions: don't print 'nil' when stdout is not a tty
Closes Homebrew/homebrew#8960.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-24 12:21:08 -06:00
Jack Nagel
cf16987845 audit: check for mercurial dependency
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-17 21:57:13 -06:00
Misty De Meo
8d100a0508 search: return results while parsing
Instead of returning a full list of results after parsing, yield and
print each result as it's found for a snappier user experience.

Closes Homebrew/homebrew#9576.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-01-13 22:31:55 -06:00
Max Howell
6626966ddd Use the basename of which_editor
I had EDITOR set to /usr/local/bin/mate set and got the whole of /usr/local opened in TextMate which takes fricking forever!
2012-01-14 02:40:43 +00:00
Jack Nagel
6d1ef8d9ca search: don't try to escape nil
Fixes Homebrew/homebrew#9575.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-12 18:55:16 -06:00
Jack Nagel
e9a0f24ccb versions: use the actual class name when unloading
And document a bit more why this hack is present.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-12 01:16:02 -06:00
Jack Nagel
79439626b5 search: return matches from open pull requests
When search can't find any local results, hit the GitHub API and search
the titles of pending pull requests. This will help people find the many
proposed formulae and prevent them from wasting time duplicating them.

Closes Homebrew/homebrew#9018.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-11 21:11:53 -06:00