diff options
| author | Martin Afanasjew | 2015-08-15 15:19:36 +0200 |
|---|---|---|
| committer | Mike McQuaid | 2015-08-16 16:47:24 +0100 |
| commit | e85e57b217939a47ba8d7f1adfec192b47d96ec0 (patch) | |
| tree | be0867c5e704fb21aade9e8d2c0d9d957507ff91 /Library/Homebrew/patch.rb | |
| parent | ccb613df69980c31bdae9acc5a3cd64a644f1fa2 (diff) | |
| download | brew-e85e57b217939a47ba8d7f1adfec192b47d96ec0.tar.bz2 | |
cleanup: make --force less aggressive
Change behavior for `brew cleanup` as follows:
- If `--force` is supplied, remove only outdated keg-only packages.
- If `--prune=<days>` is supplied, remove both logs and cached downloads
older than the specified number of days. Use `--prune=all` to remove
all logs and cached downloads irrespective of age.
- By default, remove logs after 14 days and cached downloads never.
Also centralizes handling of `--prune`, thus removing duplicate logic.
This is motivated by commit 17eee232838d4639b25f863aa342b1dda61b81bc
that made `--force` much more aggressive and made it override whatever
was specified via `--prune`, completely removing all:
- outdated keg-only packages
- cached downloads irrespective of age
- logs irrespective of age
This made it impossible to remove outdated keg-only packages without
also deleting all cached downloads, which is at least inconvenient for
people with limited bandwidth wanting to rebuild packages later.
Closes Homebrew/homebrew#42970.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Homebrew/patch.rb')
0 files changed, 0 insertions, 0 deletions
