Commit Graph
210 Commits
Author SHA1 Message Date
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
Misty De Meo 8a980d509b Correct cmake syntax in formula template
Closes #8879.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2011-11-29 14:20:38 -08:00
Charlie Sharpsteen 22f7c7eda3 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 c5639788e2 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 3edc9d212b 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 #8668.
Closes #7724.
2011-11-27 14:37:31 -08:00
Adam Vandenberg 7e94a7d048 audit: remove --strict 2011-11-27 08:39:44 -08:00
Jack Nagel a523334aba 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 6a3691aa48 doctor: use newer gcc version methods
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-26 12:01:52 -06:00
Adam Vandenberg 335e2ce358 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 cb7f7f2467 Display clang version in --config output
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-25 13:15:47 -06:00
Jack Nagel fb809331a0 doctor: remove outdated XCode version reference
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-25 13:02:54 -06:00
Jack Nagel 470b288f14 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 a446432fc0 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 db1c320a7c 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 5b9d402c44 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 7cf1b19aef 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 769b33e3d7 Don't include receipt in brew list output
Fixes #8615.
2011-11-16 10:43:44 -08:00
Jack Nagel 0f5c0b729e audit: don't check duplicate URLs
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-15 18:06:26 -06:00
Jack Nagel 4afc05483c info: display used options for installed formulae
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-13 23:27:53 -06:00
Jack Nagel a077f71502 doctor: check_git_status in correct location
This would silently fail if HOMEBREW_REPOSITORY != HOMEBREW_PREFIX,
which is obviously a valid Homebrew setup.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-10 22:53:10 -06:00
Jack Nagel 83ed63cf8a doctor: document curl/terminal width issue
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-10 22:52:18 -06:00
Jack Nagel 6b1ebced6c doctor: warn about wide terminals
A terminal width of 262 or greater can trigger a buffer overflow in
curl's progress bar code, resulting in a segfault and aborted downloads.
Warn about this.

cf #8521.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-10 20:47:17 -06:00
Jack Nagel 2c4747066d doctor: minor grammatical fix
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-10 19:49:26 -06:00
Jack Nagel bc78e2b250 cleanup: add an option to perform a 'dry run'
Sometimes you want to know what `brew cleanup` will do before it
actually removes anything. Introduce a '-n' option (chosen to match
other UNIX tools) to do this.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-07 22:46:36 -06:00
Oleg Oshmyan 79b7d18d42 audit: check for build_universal? calls if --universal unused
Closes #8123.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-02 19:02:53 -05:00
Jack Nagel 2b0f50bf74 audit: check for empty sha256 checksums
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-02 18:55:27 -05:00
Adam Vandenberg 5e3549ffed Remove debian mirror check; it is just noise 2011-10-22 09:37:10 -07:00
Jack Nagel 10ca435588 doctor: correctly detect CLICOLOR_FORCE
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-10-18 20:10:57 -05:00
Adam Vandenberg bb6a5df758 audit: complain more about tabs 2011-10-18 10:00:45 -07:00
Jack Nagel 5a1fcee336 audit: check mirror URLs
This will actually throw some possibly unwanted warnings, e.g. whining
about using mirrors.kernel.org for Debian software; we might only want
that warning for the default URL.

Perhaps mirrors deserve their own audit_formula_mirrors, but rather than
duplicate code, let's just check them against the standard criteria for
now.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-10-15 00:39:05 -05:00
Jack Nagel 658b895c36 doctor: check git version
Checking out over HTTP/HTTPS from GitHub requires git 1.6.6, as GitHub
only allows Smart HTTP transport.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-10-10 18:20:50 -05:00
Jack Nagel 5792367b28 fetch: use correct sha256 instance variable
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-10-09 15:56:15 -05:00
Jack Nagel a48b45441e doctor: warn about expired SSL certs on Leopard
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-10-03 13:57:33 -05:00
Jack Nagel 54a79b4f4b audit: improve SF 'use_mirror' detection
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-10-02 15:46:09 -05:00
Jack Nagel 2df1e3bfd5 audit: match #{prefix}/libexec and prefix+'libexec'
These were being picked up as just "#{prefix}/lib" and prefix+'lib' due
to the eagerness of the regex. Reordering "lib" and "libexec" will take
care of it; I couldn't think of a more clever solution.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-28 14:42:04 -05:00
Jack Nagel 4eb31c897f doctor: remove redundant sentence
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-27 23:35:30 -05:00
Jack Nagel 7eee683155 audit: recognize options used with 'ARGV.flag?'
A few formula use ARGV.flag? instead of ARGV.include?. This made `audit`
recognize a few undocumented instances of a '--devel' option, but we can
just ignore that like '--HEAD' for now, and change the behavior if we
decide they need to be documented explicitly in each formula.

cf. #7456.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-21 15:25:28 -05:00
Jack Nagel 03a97df974 doctor: only check git status if repository exists
Closes #7722.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-19 21:49:29 -05:00
Max Howell 6ad9225ab7 More docs for brew create generated formula tests
To assist those new to stuff.
2011-09-20 03:39:07 +01:00
Max Howell dec4b73aa0 Allow brew update --rebase 2011-09-20 02:30:31 +01:00