4907 Commits

Author SHA1 Message Date
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
Jack Nagel
9e5c0da85b 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
6b9fa0b818 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
784e3b2dfd doctor: document curl/terminal width issue
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-10 22:52:18 -06:00
Jack Nagel
c0eb8a3bc8 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 Homebrew/homebrew#8521.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-10 20:47:17 -06:00
Jack Nagel
e7947f4f92 doctor: minor grammatical fix
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-10 19:49:26 -06:00
Jack Nagel
0cc3eb296d 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
323c30978f audit: check for build_universal? calls if --universal unused
Closes Homebrew/homebrew#8123.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-02 19:02:53 -05:00
Jack Nagel
2c3b107d93 audit: check for empty sha256 checksums
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-02 18:55:27 -05:00
Adam Vandenberg
cbdb603838 Remove debian mirror check; it is just noise 2011-10-22 09:37:10 -07:00
Jack Nagel
9a9846814f doctor: correctly detect CLICOLOR_FORCE
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-10-18 20:10:57 -05:00
Adam Vandenberg
0dbf06bbc8 audit: complain more about tabs 2011-10-18 10:00:45 -07:00
Jack Nagel
8848857cea 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
d73df34bc6 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
f29c44d1fd fetch: use correct sha256 instance variable
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-10-09 15:56:15 -05:00
Jack Nagel
2f85acfeb2 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
e0c53c56e4 audit: improve SF 'use_mirror' detection
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-10-02 15:46:09 -05:00
Jack Nagel
be9d91b2b8 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
9bce115e9a doctor: remove redundant sentence
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-27 23:35:30 -05:00
Jack Nagel
51f010ac39 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. Homebrew/homebrew#7456.

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

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-19 21:49:29 -05:00
Max Howell
28aef26a47 More docs for brew create generated formula tests
To assist those new to stuff.
2011-09-20 03:39:07 +01:00
Max Howell
e26797f471 Allow brew update --rebase 2011-09-20 02:30:31 +01:00
Charlie Sharpsteen
9d19506ee9 mirror support: Add mirror method to Formula.rb
Mirrors can now be declared using the `mirror` method which works similar to
`depends_on` and takes the same arguments as `url`.

The formula class now has a public `fetch` method that cycles through the
mirror list if the downloader for the primary URL throws a `DownloadError`.
Other brew commands, like brew-fetch, also benefit from mirror support by using
this method.

Closes Homebrew/homebrew#7574.
2011-09-19 09:24:43 -07:00
Adam Vandenberg
3898010309 doctor: restore some line breaks 2011-09-16 10:05:11 -07:00
Charlie Sharpsteen
a404ceb29a brew-upgrade: Fix installation of dependencies
Fixes Homebrew/homebrew#7528.
Closes Homebrew/homebrew#7572.
2011-09-16 09:02:02 -07:00