The bug that prompted the two relevant commits has since been addressed.
Squashed commit of the following:
commit ecca17ede8324efd1175a42300ace8e1e2df30fa
Author: Jack Nagel <jacknagel@gmail.com>
Date: Sat Dec 27 16:16:12 2014 -0500
Revert "Don't use pkg_version when cleaning the cache"
This reverts commit 4d511b5169d78a5d44bbf6c36c17f0c28014a614.
commit e8935de08f6440ae1874ce523f93b19da6b68df3
Author: Jack Nagel <jacknagel@gmail.com>
Date: Sat Dec 27 16:16:12 2014 -0500
Revert "Fix cleanup for head-only formulae"
This reverts commit 510267ffd314c296c0b0969dd27d130a249f16e2.
Rationale: "prune" is slow, does not need to be run as often as
"cleanup", and is potentially destructive to things like empty
directories that Homebrew did not create. Thus we should let users run
`brew prune` only when they wish to, while still being able to use `brew
cleanup`.
ClosesHomebrew/homebrew#19863.
* `CurlDownloadStrategy#_fetch` (and the same methods in its
subclasses) now fetches the file to a temporary path, and
`CurlDownloadStrategy#fetch` moves it to the correct location.
* `Homebrew#cleanup` cleans the temporary files `CurlDownloadStrategy`
creates if they're left in the cache.
ClosesHomebrew/homebrew#13953.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
* Use version compare to only remove kegs with lower version than the
current one, not higher version which might be from someone's
branch.
* Do the same for cache cleanup.
- Be conservative so that if a name detected from cache file is not
the same as its formula then don't clean it.
ClosesHomebrew/homebrew#15914.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Add an ARGV.dry_run? helper method for '--dry-run'/'-n' now that
'-n' is being used as a git-style dry-run in two commands.
ClosesHomebrew/homebrew#12898.
Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
This still isn't perfect, but it will handle hyphens in formula-names better now. A proper solution is not easy or maybe even possible unless we ban hyphens in versions AND formula names, or use a different character as a separate in downloaded cache files which we then ban from formula-name and version strings.
Refs Homebrew/homebrew#2923.