4632 Commits

Author SHA1 Message Date
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
5bfd8faf90 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
f3f04e595d 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
016a508c7a 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
6858c00feb 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
d2bf7b4e2c 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
198135e8c0 audit: do not complain about --32-bit 2012-01-02 14:58:15 -08:00
Jack Nagel
d7c1d355f1 brew --env: respect --universal
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-12-31 21:22:22 -06:00
Jack Nagel
9c83af341f audit: check for trailing newline
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-12-31 00:05:25 -06:00
Jack Nagel
66dcfcd8cc doctor: clean up check_git_status
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-12-28 19:55:02 -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
e416bd1115 audit: remove --strict 2011-12-21 14:52:15 -08:00
Adam Vandenberg
4b7b2a17da Clean up --config 2011-12-21 10:47:44 -08:00
Adam Vandenberg
fca07369ab Omit empty caveats 2011-12-20 20:11:54 -08:00
Adam Vandenberg
e65649aeb0 --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
a68152fc7d Audit: warn about head-only formulae 2011-12-18 16:24:56 -08:00
Adam Vandenberg
807ed36129 doctor: check for Enthought Python 2011-12-18 08:36:44 -08:00
Jack Nagel
fa586cd436 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
9f4f23a7f4 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
7df7bd6a48 --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
62e1dd8bd5 Enable 'brew edit' for non-Textmate editors. 2011-12-16 14:27:58 -08:00
Jack Nagel
e4bd231680 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
db02ad1acc Idioms 2011-12-08 21:32:58 -08:00
Jack Nagel
18bdd72827 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
ea4d1f6b7b Restore --force behaviour in brew-install
Fixes Homebrew/homebrew#8933.
Closes Homebrew/homebrew#8936.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2011-12-02 09:36:38 -08:00
Jack Nagel
6f83e20f49 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
1657bb1fcf 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
f059e9624c audit: smake is also a build tool 2011-11-29 18:55:55 -08:00
Adam Vandenberg
7278eaec51 audit: check for DB deps too 2011-11-29 18:50:44 -08:00
Jack Nagel
45a87ab8d9 audit: warn about more "forbidden" dependencies
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-29 19:57:26 -06:00
Jack Nagel
7f7391243a 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
d0b904a6e4 brew doctor: Ignore config files in /usr/X11R6/bin
`/usr/X11R6` is an Apple-provided symlink to `/usr/X11`.

Fixes Homebrew/homebrew#8881.
2011-11-29 14:42:29 -08:00
Charlie Sharpsteen
75bc163f49 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 Homebrew/homebrew#8876.
2011-11-29 14:31:53 -08:00
Misty De Meo
af457fb200 Correct cmake syntax in formula template
Closes Homebrew/homebrew#8879.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2011-11-29 14:20:38 -08:00
Charlie Sharpsteen
9898956047 uses.rb: Pass a block to map instead of a Proc
Passing a `Proc` doesn't work in Ruby 1.8.6 which causes `brew uses` to fail on
Leopard.
2011-11-28 23:29:29 -08:00
Jack Nagel
8b88ea3eae Move brew-depstree into brew deps --tree
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-27 23:29:41 -06:00
Charlie Sharpsteen
b5f942764a Re-work ARGV filtering to properly handle --HEAD
Previously, stripping arguments like `--HEAD` for dependencies failed because
that flag affects the installation prefix encoded into formula objects. The
previous implementation of `ARGV` filtering tried to contain all changes to a
single method call before the `FormulaInstaller` forks. This update spreads
things out a bit:

  - The Homebrew `ARGV` extension adds a new method, `filter_for_dependencies`
    which strips flags like `--HEAD`, yields to a block, then restores the
    original contents of ARGV.

  - The `explicitly_requested?` test, which returns true or false depending on
    if a formula object is a member of `ARGV.formulae`, is now a method of
    `Formula` objects.

  - `FormulaInstaller` objects now execute the installation of dependencies
    inside an `ARGV.filter_for_dependencies` block if the dependency was
    `explicitly_requested?`.

Fixes Homebrew/homebrew#8668.
Closes Homebrew/homebrew#7724.
2011-11-27 14:37:31 -08:00
Adam Vandenberg
a494f9a3e0 audit: remove --strict 2011-11-27 08:39:44 -08:00
Jack Nagel
0851a95a01 doctor: remove terminal width check for curl
This ended up being noise for some users. We need a better set of steps
to trigger the bug in order to create a good doctor check; patches
welcome from users who are encountering this issue.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-26 12:10:10 -06:00
Jack Nagel
b712a4ff47 doctor: use newer gcc version methods
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-26 12:01:52 -06: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
Jack Nagel
a1df77f3b7 doctor: remove outdated XCode version reference
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-25 13:02:54 -06:00
Jack Nagel
17d83b735a audit: check for MacPorts patches from trunk
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-23 13:38:38 -06:00
Jack Nagel
75a7c33e6a options: treat outdated brews as installed
`brew options --installed` will now "do the right thing".

There is getting to be a small but noticeable amount of code duplication
among commands that take options like "--installed" or "--all"; it may
be worth factoring this out into a method that will return a collection
of formula objects based on the options that are passed.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-22 19:29:10 -06:00
Charlie Sharpsteen
31eba09830 audit.rb: Check version strings by default
Tired of telling people that version numbers are redundant. Just check it by
default since the `--strict` flag to `brew audit` is not well advertised.
2011-11-21 09:00:34 -08:00
Jonathan Grochowski
92faeb79b2 Delete temp directory created during brew doctor
Running brew doctor creates a temporary directory in $HOMEBREW_TEMP or
/tmp but does not clean it up afterwards. This patch deletes the
directory created to prevent polluting $HOMEBREW_TEMP or /tmp with empty
directories.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-11-20 13:22:43 -08:00
Jack Nagel
7e57847793 audit: check for ARGV.flag? in formulae
We don't want single letter options like '-v' or '-d' to unintentionally
trigger formula-specific options.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-18 15:27:09 -06:00
Charlie Sharpsteen
6c4d3a15d6 Don't include receipt in brew list output
Fixes Homebrew/homebrew#8615.
2011-11-16 10:43:44 -08:00
Jack Nagel
ebfa4d5dc0 audit: don't check duplicate URLs
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-15 18:06:26 -06:00