Commit Graph
249 Commits
Author SHA1 Message Date
Jack Nagel dde7901b94 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 be18671765 versions: ignore NameError and ArgumentError
Fixes #9856.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-29 16:00:27 -06:00
Adam Vandenberg 32a7da22a2 audit: make boost-jam a build-time dependency 2012-01-28 12:50:45 -08:00
Jack Nagel 8975242faa 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 1be8f8c6e2 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 37b785c3fd audit: reorganize some checks
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-25 22:41:53 -06:00
Jack Nagel 4df322af8d 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 aedacdf209 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 #9735.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-01-25 21:45:19 -06:00
Jack Nagel 637b4fb34e 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 d8a552c8d0 Make brew doctor reset instructions clearer.
Fixes #9739.
2012-01-24 19:36:10 +00:00
Dylan Smith f8599aaa2c versions: don't print 'nil' when stdout is not a tty
Closes #8960.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-24 12:21:08 -06:00
Jack Nagel d2c6ed039c audit: check for mercurial dependency
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-17 21:57:13 -06:00
Misty De Meo f2f26a11bb 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 #9576.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-01-13 22:31:55 -06:00
Max Howell ea40b1b87a 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 7c9a7b4272 search: don't try to escape nil
Fixes #9575.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-12 18:55:16 -06:00
Jack Nagel ed2202d349 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 c00dbf3e41 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 #9018.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-11 21:11:53 -06:00
Jack Nagel f05db25a8e 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 483d41c7ef versions: unload old class before obtaining version
This is silly, but I am no Rubyist and I don't have time to
figure out why Formula.factory(foo).url works as expected but
Formula.factory(foo).version does not.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-06 22:07:45 -06:00
Jack Nagel b26e66fa46 versions: enable '--compact' output
This will be useful for shell tab completion when something like `brew
install <formula> --version <version>` is implemented.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-06 14:51:15 -06:00
Jack Nagel 49bb7b65a5 versions: determine version from a Formula instance
Rather than regex the output of `git show <rev>:<path>`, we write the
output of `git cat-file blog <rev>:<path>` to a temporary file, and then
operate on it just as we would a normal formula.

I haven't observed any speed difference. `git cat-file blob` is faster
than `git show`, but the "slow part" is still the git-rev-list
invocation. But really it's pretty fast overall.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-06 14:51:15 -06:00
Jack Nagel aee6acecdc info: always mark currently linked keg with *
When multiple kegs are installed, `brew info` marks a keg with an
asterisk if f.installed_prefix == keg, but this is only true if either
HEAD or the newest version of the formula is installed. This isn't
always useful, so let's mark the currently linked keg with an asterisk
regardless of the version.

Obviously, keg-only formula will never be marked, but this is probably a
feature. When multiple keg-only kegs exist, chances are that they are
each being utilized by something, so there isn't really a "used" and
"unused" version.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-03 19:50:20 -06:00
Jack Nagel 5079980d0c info: display used options for all installed kegs
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-03 19:50:19 -06:00
Adam Vandenberg 84d98ea9b9 audit: do not complain about --32-bit 2012-01-02 14:58:15 -08:00
Jack Nagel 684e3f8a15 brew --env: respect --universal
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-12-31 21:22:22 -06:00
Jack Nagel b02b8d1694 audit: check for trailing newline
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-12-31 00:05:25 -06:00
Jack Nagel 5bc2d70cad doctor: clean up check_git_status
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-12-28 19:55:02 -06:00
Jack Nagel 14262d5891 config: prettify sha method
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-12-28 19:54:59 -06:00
Adam Vandenberg bcaffd76a8 audit: remove --strict 2011-12-21 14:52:15 -08:00
Adam Vandenberg c40c779b53 Clean up --config 2011-12-21 10:47:44 -08:00
Adam Vandenberg f9156eeabd Omit empty caveats 2011-12-20 20:11:54 -08:00
Adam Vandenberg 72fc9fc3ef --HEAD checks
* Force --HEAD for head-only installs
* Don't allow --HEAD for stable-only formulae
2011-12-18 16:24:56 -08:00
Adam Vandenberg 236ce9ea41 Audit: warn about head-only formulae 2011-12-18 16:24:56 -08:00
Adam Vandenberg 8c0796e805 doctor: check for Enthought Python 2011-12-18 08:36:44 -08:00
Jack Nagel c4d1743c58 doctor: normalize representation of env variables
Current warnings contain a mix of variable names with a '$' prefix and
without; most documentation omits the '$', so drop it.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-12-16 20:34:30 -06:00
Jack Nagel 8b2ddfa9a4 doctor: fix a couple of git-related checks
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-12-16 20:34:17 -06:00
Jack Nagel d2288949e4 --env: dump a few more environment variables
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-12-16 19:47:37 -06:00
Adam Vandenberg 2b297bc03f Enable 'brew edit' for non-Textmate editors. 2011-12-16 14:27:58 -08:00
Jack Nagel cada681d1e audit: hard wrap dep warning
The warning is lengthy, and usually wraps on 80-column terminals.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-12-15 16:59:02 -06:00
Adam Vandenberg 697d2ae39e Idioms 2011-12-08 21:32:58 -08:00
Jack Nagel 3dac87e62c audit: check for hard-coded compilers
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-12-08 23:08:42 -06:00
Misty De Meo eb89df88dc Restore --force behaviour in brew-install
Fixes #8933.
Closes #8936.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2011-12-02 09:36:38 -08:00
Jack Nagel cdfc600fae audit: only perform GNU URL check on primary URLs
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-30 13:14:24 -06:00
Jack Nagel 014aadd20e audit: disable GNU url check
It needs to be reworked to only check the primary URLs, as we are now
using ftp.gnu.org as a mirror.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-30 12:57:29 -06:00
Adam Vandenberg 49de8f2eb3 audit: smake is also a build tool 2011-11-29 18:55:55 -08:00
Adam Vandenberg bb1cd3719c audit: check for DB deps too 2011-11-29 18:50:44 -08:00
Jack Nagel 28da63e4f3 audit: warn about more "forbidden" dependencies
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-29 19:57:26 -06:00
Jack Nagel ead6a69541 audit: check for build-time dependencies
This can be made more robust in the future when we stop throwing away
the ':build' type flag in Formula#depends_on.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-29 19:40:14 -06:00
Charlie Sharpsteen 4250018b8e brew doctor: Ignore config files in /usr/X11R6/bin
`/usr/X11R6` is an Apple-provided symlink to `/usr/X11`.

Fixes #8881.
2011-11-29 14:42:29 -08:00
Charlie Sharpsteen 294af55b24 brew doctor: Note there is no GCC in XCode 4.2+
Should help advert confusion surrounding the "could not find gcc 4.2.x" message
recieved by Lion users running the latest version of XCode.

Fixes #8876.
2011-11-29 14:31:53 -08:00