Commit Graph
159 Commits
Author SHA1 Message Date
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
Misty De Meo cb1b256f4d 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 2090a0f5cb 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 1cf67a1b2b Improved no-errors output 2011-08-31 15:38:21 +01:00
Max Howell 327945ef5c 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 339142932a Check for missing deps as part of brew doctor 2011-08-31 15:36:29 +01:00
Max Howell c292ae9145 Prune LinkedKegs too 2011-08-28 11:40:03 +01:00
Max Howell 5e5bbd8f4b 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 #7191; though it could be fixed better.
2011-08-26 13:26:46 +01:00
Max Howell c0710f74fc Fix brew update after new install for real this time?
Fixes #7220.
2011-08-26 11:25:09 +01:00
Charlie Sharpsteen 99918c08f5 Leopard: Eliminate moar Array.count from brew upgrade 2011-08-25 18:02:36 -07:00
Charlie Sharpsteen 8cb7090723 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 4a4b88ff69 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
Max Howell 46c38bf6dd Force contributors to define a test by adding it to the create template
A little cheeky but it should help us to maintain higher quality.
2011-08-25 00:53:37 +01:00
Max Howell d92847c2ac Don't include LinkedKegs or Aliases with brew edit 2011-08-24 22:30:44 +01:00
Max Howell 3da76d0f37 Record which keg is linked
Will be useful for a variety of reasons, but for now, I'm just using it to ensure install won't install again if something is already installed (use brew upgrade instead).

But means that brew switch and that can work properly etc.
2011-08-24 22:30:44 +01:00
Max Howell 179bad1b1d Fix keg exception pretty output 2011-08-24 22:30:43 +01:00
Max Howell 81f1fb38a9 brew upgrade
Consequence: you can no longer install when something is already installed, you must upgrade it. This doesn't apply if the formula in question was unlinked. You can still --force installs though.

Rationale: the old way of installing over the top would leave symlinks to multiple versions in /usr/local if the old version had a file the newer version didn't. The new upgrade command handles everything properly.
2011-08-24 22:30:43 +01:00
Max Howell 842ae1eeea Prettier brew uses output (columnate) 2011-08-24 22:30:43 +01:00
Max Howell db4e971064 Constants that are used once are dumb
It just means nobody knows what is being done without scrolling up and down, up and down the file like a doofus on a pogo stick.
2011-08-24 22:30:42 +01:00
Max Howell 29a9dbece2 Revise cleanup text, we're removing, not uninstalling 2011-08-24 22:30:42 +01:00
Dave Bayer f16c72ef17 Fix uninstall.rb brew remove --force "Directory not empty" error
Finder activity such as moving the position of an icon can create an unexpected
.DS_Store file in a Cellar directory. This causes `brew remove --force` to throw
an error that is reported as

Error: Directory not empty - /usr/local/Cellar/<formula>

This fix avoids that error, by calling rmtree rather than rmdir.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-08-22 20:26:53 -07:00
Max Howell f78fb38689 Specify that they are symlinks 2011-08-22 10:26:01 +01:00
Max Howell 63da621a3f Only error out for sudo brew install
Note this only happens if Homebrew is *not* installed sudo. Which is most of the time true.

Fixes #6899
2011-08-17 12:30:21 +01:00
Jack Nagel 54dc96d840 Add keg-only text to brew info output
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-08-11 11:46:35 -07:00
Adam Vandenberg fae72fe7ca brew doctor: do not check TMPDIR if it is not set 2011-08-07 10:01:52 -07:00
Max Howell 9e5e27b425 Reset --hard after the first git init
We don't know what revision the tarball was when homebrew was installed, so all we can do really is hard reset. In theory some set of git commands should suffice, but apparently --soft and --mixed resets ended up putting stuff in the index which would break subsequent `brew updates`.

Fixes #6851
2011-08-06 11:11:06 +01:00
Max Howell cbbad7a8d9 Prettier brew versions output 2011-08-02 14:45:37 +01:00
Max Howell d3e2c38fc6 Fix brew doctor if sbin directory doesn't exist 2011-08-02 14:45:03 +01:00
Jack Nagel cbcd4a32a6 Fix brew update local changes bug
Users were seeing local changes in their repository after updating, even
though they had made no local changes.

The repository setup sequence should use `git reset --soft` rather than
vanilla `git reset`, which defaults to '--mixed'. '--soft' updates
_only_ HEAD, leaving the index as-is, allowing future incantations of
`brew update` to proceed without errors.

Fixes #6732.
2011-08-02 13:21:06 +01:00