Commit Graph
1238 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 172c05ed9f mkpath directories under lib/ocaml
Ocaml packages that need to install here will cause the site-lib
directory to be created, and the symlink in the ocaml keg will work as
intended. This is necessary for the ocaml bottle to work properly.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-30 00:04:33 -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
Mike McQuaid b96fac7278 Bottles should care about cellar and prefix 2012-01-29 20:08:08 +00:00
Mike McQuaid 3c2524ec27 Bottles should care about cellar path not prefix.
Closes #9844.
2012-01-29 13:03:35 +00: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
Konstantin Shabanov b3c3fed1eb Strip escaping from query
Regexp#source retains escape sequences as is, so searching for formulae
like 'pure-ftpd' doesn't work.

Closes #9597.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-26 18:21:26 -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 84a2e44db4 Fix failing ENV tests
We need the ARGV extension now that we call ARGV.build_bottle? in
set_cpu_cflags.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-25 21:20:13 -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
Adam Vandenberg 548ecf24a2 Rubyisms 2012-01-23 19:29:55 -08:00
Jack Nagel ed07a0f411 Don't append an empty value to CFLAGS
Appending an empty string results in an extraneous space character.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-19 22:54:28 -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
Mike McQuaid 47bd7be80a Store in tab whether --build-bottle flag was used.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2012-01-16 21:05:00 +00:00
Mike McQuaid 3b6c4d99ec Use more generic cflags when building bottles.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2012-01-16 21:05:00 +00:00
Mike McQuaid 89dc85b09d Add option for building bottles.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2012-01-16 21:05:00 +00:00
Mike McQuaid 28c20b387b Don't try and use GCC on Xcode 4.2: it's gone Jim.
Closes #9622.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2012-01-16 21:00:24 +00:00
Mike McQuaid 1e98594277 Bump highest seen LLVM version.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2012-01-16 21:00:24 +00:00
Jack Nagel 3e4335894d Unlink old keg when upgrading dependencies
Installing a formula via `brew install` may trigger upgrades of its
dependencies if the dependencies are installed but outdated. However, we
never unlinked the existing keg in FormulaInstaller#install_dependency
which caused the link step to fail.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-15 17:18:17 -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 14d7d03425 Fix libinet version detection 2012-01-14 03:48:03 +00:00
Misty De Meo 9056c49f9d search: use v2 API
The v3 API currently lacks a search feature. Use the v2 API instead for
much faster pull request filtering.

Closes #9592.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-01-13 20:55:18 -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 749a3538fe pathname: recognize ".cpio.*" double extensions
Just a cosmetic nicety.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-12 20:31:47 -06: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
Misty De Meo e404417d5a ENV.gcc: search HOMEBREW_PREFIX/bin for gcc-4.2
Allow the use of a Homebrewed gcc-4.2 in order to support homebrew-alt's
apple-gcc42 formula.

This also removes the :force filtering for the gcc-4.2 check error.

Closes #9384.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-01-11 21:16:13 -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 8fa64c00b4 Tab: handle non-core kegs without receipts
Passing Formula.factory the name of a keg that belongs to a non-core
formula will cause an error to be raised; we don't really care, so just
fake a totally empty install receipt in this case.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-05 12:03:04 -06:00
Jack Nagel 6fa995c71c Force creation of locale-specific man directories
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-04 20:50:19 -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
Jack Nagel 913b8c4d60 tab: allow retrieving tabs from arbitrary kegs
This will be useful in places where we need information about things
other than the currently linked keg, such as `brew info`.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-03 19:50:19 -06:00
Jack Nagel b3fafa3ff1 Add a helper to determine if a keg is linked
'keg.linked?' will return true if there is an entry for 'keg' in
LinkedKegs.

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
Adam Vandenberg 4fb16996f9 Standardize 32 bit build switch 2012-01-02 14:53:36 -08:00
Jack Nagel ae75008a35 tests: add missing require to test_ENV
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-01 23:58:15 -06:00
Felix Buenemann e1ab74e879 Omit check_m4 warning when appropriate
If the suggested modifications are already in place, just skip the
warning.

Closes #8624.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-01 23:15:31 -06: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