1276 Commits

Author SHA1 Message Date
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
Charlie Sharpsteen
2492c6564d 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
94dba21f7d 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
95ce00729c Check Cellar can be made before installing stuff
Refs Homebrew/homebrew#5188.
2011-09-15 10:57:22 +01:00
Jack Nagel
f4c301a827 audit: improve GNU url check
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-13 23:35:31 -05:00
Jack Nagel
ff9042f650 audit: correctly match SourceForge https URLs
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-13 23:35:31 -05:00
Jack Nagel
b0f5566566 brew-options: add --installed flag
`brew options --installed` will print options for formulae that are
already installed.

Closes Homebrew/homebrew#7565.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-12 15:43:18 -05:00
Jack Nagel
346a973848 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
adb85c7f38 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
627a8463a6 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
536446b664 Use HTTPS during brew update
Closes Homebrew/homebrew#7527.

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

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-02 10:00:15 -05:00
Max Howell
34aea5c987 Handle brew upgrade ARGV errors properly
Fixes Homebrew/homebrew#7304.
2011-09-02 12:12:30 +01:00
Jack Nagel
2505ebda67 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
66841687eb Edit port/fink warning 2011-09-01 10:14:26 -07:00
Adam Vandenberg
3d88bb851e Edit port/fink warning 2011-09-01 10:08:21 -07:00
Adam Vandenberg
80335bba74 add brew doctor check for spaces in Xcode path 2011-09-01 09:39:31 -07:00
Max Howell
d5071d5ded Allow brew install --force again 2011-09-01 10:27:47 +01:00
Misty De Meo
69e766a699 fix brew update treating command changes as deletions
`brew update` was treating all changes to internal commands as
deletions due to a typo, resulting in spurious notifications of removed
commands.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-08-31 12:16:01 -05:00
Jack Nagel
54e7eb3b90 update: make git pull update origin/master
Specify the refspec 'refs/heads/master:refs/remotes/origin/master' so
that the remote-tracking branch origin/master gets update during `brew
update` (git-pull updates remote-tracking branches when invoked
like `git pull` or `git pull origin`, but not `git pull origin master`).

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-08-31 12:10:49 -05:00
Max Howell
c0653d7581 Improved no-errors output 2011-08-31 15:38:21 +01:00
Max Howell
bfabfe77dd Only report PATH order diagnosis if conflicts are found
Rationale: brew doctor shouldn't give warnings for a default install. And this particular warning only applies for a small subset of formula: the ones that are "dupes".

If we get reported issues that prove this was a mistake we will revert it.
2011-08-31 15:38:11 +01:00
Max Howell
0aca152f23 Check for missing deps as part of brew doctor 2011-08-31 15:36:29 +01:00
Max Howell
de56768c6e Prune LinkedKegs too 2011-08-28 11:40:03 +01:00
Max Howell
7c5073fff2 Feature new/removed internal commands
Removed updated external commands, like seriously, who cares? We could add it back as if --verbose is set I guess but in all honesty, if nobody complains then nobody cared.

# We removed many redundant comments
Removed many redundant comments.

Fixes Homebrew/homebrew#7191; though it could be fixed better.
2011-08-26 13:26:46 +01:00
Max Howell
0d6aff5e1b Fix brew update after new install for real this time?
Fixes Homebrew/homebrew#7220.
2011-08-26 11:25:09 +01:00
Charlie Sharpsteen
e527c1c83a Leopard: Eliminate moar Array.count from brew upgrade 2011-08-25 18:02:36 -07:00
Charlie Sharpsteen
f7bd98875b Leopard: Fix undefined method count for Array
Leopard runs Ruby 1.8.6 while Snow Leopard runs 1.8.7 and `Array.count` was not
introduced until 1.8.7.

Using `Array.length` instead.
2011-08-24 17:45:19 -07:00
Max Howell
98fc60db69 brew update uses origin rather than full URL
This is more flexible for forks and personal customisations, and also more useful for us collaborators since the origin HEAD will be kept up-to-date.
2011-08-25 01:20:33 +01:00