Running `brew cleanup` (with no arguments or multiple arguments) will
run `brew prune` after _every_ cleaned formula, i.e. possibly after
every installed formula.
With this change it will instead only run `prune` after all formulae are
cleaned, and only when no arguments were given to `cleanup`.
Signed-off-by: Max Howell <max@methylblue.com>
ClosesHomebrew/homebrew#743
If the formula was updated and not yet installed, then cleanup would delete all kegs. Which is most likely not what the user wanted.
Ideally we'd do a version check to figure out which keg is newest. But we don't yet have a function that can determine with accuracy version order.
Not using path.basename for mktemp due to risk of bugs due to incorrect escaping. But mainly, mktemp gives a unique name and this operation is procedural.
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.
* 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.
brewkit.rb changes ENV destructively, so lets not do that everytime a formula
is required. Now it's possible for other tools to require a formula
description without worrying about side-effects.
This reverts commit a1ed2cb19706e317d34f1a9f2efe8a2d2388afae.
The is running part of the Applescript didn't seem to prevent Safari getting
loaded when it wasn't running when used via osascript. It worked in
ScriptEditor! Honest!
Also we decided that it probably wouldn't work often enough anyway.
Discussion: a1ed2cb197
We don't duplicate, so libxml and that are already provided by OS X. Mercurial is provided by easy_install.
I'm adding this to save people contributing stuff that we won;t accept. I hate disappointing people :(
Determine all directories that aren't Homebrew ones.
Exec find.
I prefer to keep short stuff in bin/brew so people reading the code have a better idea of what happens, and what sort of functions are useful for the sorts of things we do with Homebrew.
This was adapted from adamv@d5e78ee26535dec4b11c33d14832a9ee945a29fd
I decided prompting would was the most usable solution here, as the stem is
unlikely to be useful so the user would have to rename the file and change
the class name as well as type the command once and then again with --force.
Dissent welcome.
FixesHomebrew/homebrew#15
Our build directories are space-less, but the final destination may have
spaces, especially since OS X often uses your full name as your home directory
path.
I'm trying to only show the interesting stuff. You can see a full listing with
brew -v list, or by piping to other commands.
Tell me if you hate it or love it.
Otherwise you run the risk of not running the exact version / make of the utility you planned.
FixesHomebrew/homebrew#48
Really we need to do this formula too, so I guess a make and cmake function are on the way…
Using more Pathname methods.
Only show text if verbose mode is on, as is typical for the rest of our install output.
TODO: would be nice if we knew you were a dev and automatically enabled verbose mode perhaps.