Commit Graph
186 Commits
Author SHA1 Message Date
Max Howell 708d6689a5 Only try to cleanup directories 2010-01-18 08:36:29 +00:00
Max Howell f5960ccd9e Use Ruby rather than external commands
`ls` could go wrong more than Pathname.children
2010-01-18 08:34:07 +00:00
Joshua Peek ffd39835ec Add cleanup command
* `brew cleanup foo` removes any unlinked foo kegs
* `brew cleanup` removes all unlinked kegs
2010-01-18 08:27:50 +00:00
Adam Vandenberg 75b8a06e1c Some bulletproofing for bash completion script.
Since Homebrew's Library doesn't have to be linked under prefix,
we need to do some extra work in the bash completion script to
support this configuration.

Added a "--repository" option to brew, and updated the completion
script to use paths relative to this location.
2010-01-16 15:33:32 +00:00
Adam Vandenberg 5bcc1df847 Fixes #168 - don't show multiple copies of the same dep. 2010-01-16 15:33:31 +00:00
Adam Vandenberg b99ee98271 Add recommended GCC & LLVM versions to --config. 2010-01-16 15:26:54 +00:00
Max Howell 4f111dfd9a Print quotes around executed arguments with spaces
Eg: ['foo', 'bar la'] -> "foo 'bar la'"
2010-01-13 11:23:15 +00:00
Adam Vandenberg 79766ede79 Detect X11 when ENV.x11 is requested; dump in --config. 2010-01-11 11:36:35 -08:00
Max Howell d9dc06a0a7 Check GitHub for issues relating to build failures
Uses the GitHub issue search API, so it's very neat and concise. However you can get false positives, so it's not 100% useful. Still I think it is more useful than before, which was, nothing.

A further issue is it depends on the ticket at GitHub using the formula's proper name. So we should ensure this as we can.

Finally, it does add a possibly large delay to clean exit after a build error. We may want to fiddle with timeouts if it becomes troublesome.
2010-01-06 23:38:07 +00:00
Max Howell 8032b9bdcf If Xcode isn't installed, raise
We were raising but in a completely misleading and unintended fashion.
2009-12-30 20:52:06 +00:00
Alexander Solovyov c477846c7d brew: add 'cat' command 2009-12-22 05:49:31 +00:00
Adam Vandenberg c25c47b2ae Another git command. 2009-12-12 16:24:15 +00:00
Adam Vandenberg 5e565022d6 Some small style reformats 2009-12-12 16:24:15 +00:00
Max Howell d83fe25248 Unlink before uninstalling
Nice bug there where we never removed any symlinks, because the unlink step requires the keg to be full of files to determine what symlinks to remove.
2009-12-12 16:23:03 +00:00
Max Howell b2fd885493 Brew update will git init if required
This is necessary for those who installed Homebrew using the suggested tarball method.

Too late for them though.
2009-12-07 18:20:04 +00:00
Max Howell d9820d98d3 Prompt user to use pip for Hg and Bzr 2009-12-05 17:29:49 +00:00
Max Howell 5bae3b5a94 Puts URL for failed build line 2009-12-04 10:36:25 +00:00
Max Howell fb9c8cc707 cd HOMEBREW_REPOSITORY before trying to git info it 2009-12-02 13:07:20 +00:00
Max Howell a997d2c4a5 Show exit status properly
Turns out $?.to_i is a 16bit int with some bit flags in the first byte.
2009-12-02 13:07:03 +00:00
Max Howell 3b73417815 We don't need the whole backtrace for BuildErrors 2009-12-02 12:31:44 +00:00
Max Howell b5d132eca7 We can't rely on the $: order
Some gems and libraries seem to change the order.
2009-12-01 12:07:34 +00:00
Max Howell 7ced6aaf9e brew --config output improved if no GCC 2009-12-01 12:07:34 +00:00
Adam Vandenberg c1d91ef443 Add command 'brew info --all'. 2009-11-19 14:03:08 -08:00
Adam Vandenberg b6ca4dcf81 New command 'brew deps [formula]'
Where brew info will show the next-level-down dependencies, brew deps
will show all of the formulae that a given formula depends on.
2009-11-19 14:03:07 -08:00
Adam Vandenberg 84024e64e3 Add alias support to formulae
* brew install will find an aliased formula
* aliases are searched against
* warn when creating a new formula that has an existing alias.

If Subversion has an alias "svn", then warn when the user tries to
create a new formula "svn". The formula can still be created, though
the user should make sure it's not a duplicate of the existing
aliased one.

Subversion and Objective-Caml formulas get some alises here, so we have
something to test against.
2009-11-19 14:03:07 -08:00
Adam Vandenberg 62cef23419 Add brew command 'uses'
'uses' shows the formulas that depend on a formula given on the
command-line.
2009-11-19 14:03:07 -08:00
Adam Vandenberg 8a7b9ea189 Add extra message for unknown commands that are git commands. 2009-11-19 14:03:07 -08:00
Adam Vandenberg 246f44d735 Also allow 'brew help'. 2009-11-19 14:03:07 -08:00
Adam Vandenberg 8f3ff69665 Fix when 'edit' if/else indentation 2009-11-19 14:03:06 -08:00
Adam Vandenberg ef39adab33 Move some helper functions into Hardware 2009-11-19 14:03:06 -08:00
Max Howell 70bed07247 More tweaking of main exception handler output 2009-11-12 01:37:02 +00:00
Max Howell c078840bfb Show kernel architecture in brew --config output 2009-11-11 21:51:44 +00:00
Max Howell 1912cbb85f Re-raise SystemExit so the correct exit code is set
The reason we rescue this exception at all is because otherwise our general purpose Exception handler catches it.
2009-11-11 18:56:37 +00:00
Adam Vandenberg 394e4fd7a4 Be specific about 3.1 point release. 2009-11-11 10:49:01 -08:00
Max Howell a785a5ee81 dump_config for certain exceptions
Ideally we could do a get request and fill in the issue form at GitHub. Presumably though, we'd only do this if the user typed brew report or somesuch.

Someone should get that implemented!
2009-11-11 18:43:03 +00:00
Max Howell a90531305d Include macports or fink info with brew --config 2009-11-11 18:43:02 +00:00
Max Howell 0c550e12b9 Include HEAD SHA with brew --config 2009-11-11 18:37:13 +00:00
Max Howell 709dcb900a My idea of tidy, sorry Adam… 2009-11-09 18:48:05 +00:00
Max Howell b43dbfafe2 DRY gcc_build and llvm_build 2009-11-09 18:47:26 +00:00
Adam Vandenberg de1ebbefc3 Add OS X, Ruby, compiler & hardware info to --config 2009-11-09 18:35:39 +00:00
Max Howell 0a19a05572 Don't error out before Cellar is created
We need a test for this.
2009-11-08 16:23:08 +00:00
Max Howell bc32b13c5a Warn users about Xcode versions that are too old
Closes #116
2009-11-08 16:22:15 +00:00
Max Howell d81a8e6514 Simplify the library path determination code a little 2009-11-08 15:21:15 +00:00
Max Howell 1cd83cd2eb Set ENV[HOMEBREW_BREW_FILE]
Thus install.rb gets the path to the instantiating brew process rather than whichever is first in the PATH. Not to mention Homebrew doesn't *have* to be in the PATH.
2009-11-08 15:21:14 +00:00
Max Howell d086ea4029 Rename BREW_FILE HOMEBREW_BREW_FILE
Because it's a global.h constant and that file can be included by other projects.
2009-11-08 15:21:14 +00:00
Max Howell 7dcd5a03bd Ensure BREW_FILE is an absolute path
It's a constant and Dir.getwd can change.
2009-11-08 15:21:14 +00:00
Max Howell 6e74ee9f6b Propagate exit status in ExecutioError exception 2009-11-07 18:22:36 +00:00
Max Howell 8e676a39c0 brew edit works if the file in question won't parse 2009-11-07 18:22:36 +00:00
Max Howell 8cfa1a8007 Provide system info for build errors 2009-11-07 18:22:34 +00:00
Max Howell f4670bd7de Don't require hardware.rb globally 2009-11-07 18:22:33 +00:00