Commit Graph
187 Commits
Author SHA1 Message Date
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
Charlie Sharpsteen efcdbd691e 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 #7574.
2011-09-19 09:24:43 -07:00
Adam Vandenberg d43e3516d8 doctor: restore some line breaks 2011-09-16 10:05:11 -07:00
Charlie Sharpsteen 5b4d59d143 brew-upgrade: Fix installation of dependencies
Fixes #7528.
Closes #7572.
2011-09-16 09:02:02 -07:00
Charlie Sharpsteen 00cd16f866 Return Formula objects from outdated_brews
Previously, `outdated_brews` returned a list of lists---each containing three
components of a Formula object:

  - f.rack
  - f.name
  - f.version

Frequently more information is required which necessitates back-casting from
`name` to a Formula object---simpy returning formula objects removes this step.
2011-09-16 08:55:38 -07:00
Charlie Sharpsteen 06fbecbeae Centralize definition of rack in formula.rb
`rack` is a commonly used alias for `formula.prefix.parent`---so common that it
gets defined and used quite a bit. This patch makes `rack` an official method
of the `Formula` class.
2011-09-16 08:55:38 -07:00
Max Howell a0b940acb7 Check Cellar can be made before installing stuff
Refs #5188.
2011-09-15 10:57:22 +01:00
Jack Nagel 98d2d45852 audit: improve GNU url check
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-13 23:35:31 -05:00
Jack Nagel 6e03814549 audit: correctly match SourceForge https URLs
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-13 23:35:31 -05:00
Jack Nagel 2313a4d2af brew-options: add --installed flag
`brew options --installed` will print options for formulae that are
already installed.

Closes #7565.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-12 15:43:18 -05:00
Jack Nagel c9e91196b2 audit: check GNU urls
We now prefer "ftpmirror.gnu.org" over the main FTP site.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-12 15:43:02 -05:00
Jack Nagel 80bd4a5294 brew-options: actually skip formulae with no options
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-11 16:25:20 -05:00
Jack Nagel 1cf80272fc doctor: be more robust about git status check
`git status -s` would spit out "fatal: not a git repository" when not in
HOMEBREW_PREFIX or a child directory of HOMEBREW_PREFIX. Specify a
git-dir and work-tree to fix this.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-11 11:12:08 -05:00
Jack Nagel c333ab5444 Use HTTPS during brew update
Closes #7527.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-10 16:24:51 -05:00
Max Howell 67bc01e53e The doctor notices modifications to Homebrew core
Refs #7525.
2011-09-09 09:24:16 +01:00
Max Howell 8a5633c4f2 Check that /usr/bin/cc exists in brew doctor
Refs #7454.
2011-09-07 12:18:28 +01:00
Max Howell c32315b566 Fix nil handling in brew versions
Fixes #7392.
2011-09-05 09:44:53 +01:00
Daemian Mack 57a4091f59 Fix typo in brew doctor
Fixes #7383.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-02 10:00:15 -05:00
Max Howell e02e7f853e Handle brew upgrade ARGV errors properly
Fixes #7304.
2011-09-02 12:12:30 +01:00
Jack Nagel 75a6e29d97 fetch: fix '--force' for pathnames
`brew fetch --force` was a no-op for formula pathnames when that formula
did not exist in Library/Formula, because `brew --cache #{f.name}`
results in an error for that case.

Fix it by always using f.cached_download.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-01 19:17:13 -05:00
Adam Vandenberg 88849ddce0 Edit port/fink warning 2011-09-01 10:14:26 -07:00
Adam Vandenberg 279a1dea3d Edit port/fink warning 2011-09-01 10:08:21 -07:00
Adam Vandenberg b90f374da3 add brew doctor check for spaces in Xcode path 2011-09-01 09:39:31 -07:00
Max Howell 2e80976a43 Allow brew install --force again 2011-09-01 10:27:47 +01:00