Mike McQuaid
e7c5d91151
cleanup: add --prune-prefix option.
...
From https://discourse.brew.sh/t/error-calling-brew-prune-is-disabled/4142/4 and https://github.com/github/homebrew-bootstrap/pull/72 it seems this is worth having as a dedicated flag.
2019-02-13 09:39:21 +00:00
Mike McQuaid
6cb7a00f2d
cmd: remove --help headers and tweak docs.
2019-01-30 21:39:28 +00:00
Gautham Goli
cffa796634
cleanup: Use CLI::Parser to parse args
2018-12-12 02:02:19 +05:30
EricFromCanada
b2b8f632bb
docs: distinguish <code> and <var> in HTML output
...
Replace <var> tags with markup for italicized monospaced text in Markdown.
This requires the source to not combine bracketed and backticked text.
2018-10-06 00:51:13 -04:00
Yurii Kolesnykov
de2700c9b6
add quotes to brew --cache in help for cleanup command
2018-09-17 12:13:29 +03:00
Markus Reiter
55cde526a8
Deprecate brew cask cleanup
.
2018-08-13 20:09:34 +02:00
Markus Reiter
03b93da296
Use option parser for brew cleanup
.
2018-08-08 13:11:16 +02:00
Mike McQuaid
9fca172d03
Fix HOMEBREW_RUBY_WARNINGS="-w"
...
Fix various circular requirements, method redefinitions, etc.
2018-04-07 20:28:56 +01:00
Markus Reiter
9bee9ca575
Use “squiggly” heredocs.
2017-10-18 14:39:09 +02:00
Joshua McKinney
48fdd163bc
Brew cleanup: Continue on error removing keg
...
Fixes #2355
Create unremovable_kegs instance var
Check cellar cleanup failure after full cleanup completes
Use module_function in Homebrew::Cleanup as we never instantiate the
class
2017-03-31 01:44:04 -05:00
EricFromCanada
afc539f86e
Update brew's man page formatting and grammar
...
Also update command specifications to match descriptions.
2017-02-25 17:37:57 -05:00
Markus Reiter
0ab750bf24
Use module_function
for commands.
2016-10-02 00:24:47 +02:00
Markus Reiter
a5b11a6a5c
Fix Style/GuardClause.
2016-09-23 15:30:07 +02:00
Max Nordlund
fa1fd70a37
Add all the top level comments
2016-04-10 22:59:25 +02:00
Baptiste Fontaine
9bdd6619e2
cleanup: move code away from cmd/
...
Closes Homebrew/homebrew#47484 .
Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-04 13:17:21 +01:00
Rakesh
090b133a01
cleanup: display total disk space to be cleared
...
Closes Homebrew/homebrew#45642 .
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-12-30 08:12:03 +00:00
Dominyk Tiller
e00216e4e5
cmd/cleanup: cleanup java_cache
2015-12-18 23:32:56 +00:00
Corey Prophitt
267465ea6f
cleanup: don't warn when skipping pinned formula.
...
Closes Homebrew/homebrew#46604 .
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-12-04 18:07:11 +00:00
Xu Cheng
cc8859f86a
cleanup: use installed_prefixes/installed_kegs
2015-11-29 20:24:30 +08:00
Xu Cheng
ee332c4550
handle TapFormulaWithOldnameAmbiguityError
...
Closes Homebrew/homebrew#44705 .
Signed-off-by: Xu Cheng <xucheng@me.com>
2015-10-08 16:02:33 +08:00
Forrest Fleming
e0f9994542
Remove incomplete files in cache on brew cleanup
...
Closes Homebrew/homebrew#44182 .
Closes Homebrew/homebrew#44349 .
Signed-off-by: Xu Cheng <xucheng@me.com>
2015-10-06 15:13:25 +08:00
Xu Cheng
a88c40b8c8
core file style update
2015-08-22 13:15:33 +08:00
Baptiste Fontaine
8ba0fb9fcf
unnecessary calls to .select simplified
...
These are minor perf optimizations.
Closes Homebrew/homebrew#43028 .
Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-08-18 00:18:22 +02:00
Dominyk Tiller
63a7f29270
cleanup: require thread
2015-08-16 21:01:52 +01:00
Xu Cheng
c4df86eb9d
cleanup: speed up rm_DS_Store by multithread
...
Before
```
$ time brew cleanup -s
brew cleanup -s 0.73s user 3.52s system 58% cpu 7.297 total
```
After
```
$ time brew cleanup -s
brew cleanup -s 0.69s user 2.57s system 139% cpu 2.341 total
```
Closes Homebrew/homebrew#42968 .
Signed-off-by: Xu Cheng <xucheng@me.com>
2015-08-17 01:54:03 +08:00
Mike McQuaid
9025719968
cleanup: fix reversed prune time.
2015-08-16 17:50:33 +01:00
Mike McQuaid
76316a82cb
cleanup: tweak prune code.
2015-08-16 16:57:12 +01:00
Martin Afanasjew
e85e57b217
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>
2015-08-16 16:47:24 +01:00
Xu Cheng
5414597913
cleanup: avoid duplicated logic
...
Closes Homebrew/homebrew#42900 .
Signed-off-by: Xu Cheng <xucheng@me.com>
2015-08-14 15:52:57 +08:00
Xu Cheng
203cecb463
add Formula.racks
...
Also exclude symlink when enumerating installed racks.
2015-08-14 15:52:56 +08:00
Mike McQuaid
15c3fb32b2
cleanup: remove SCM directories recursively.
2015-08-13 10:34:45 +01:00
Mike McQuaid
04b350dce5
cleanup: do cleanup even without a Cellar.
2015-08-13 10:31:37 +01:00
Mike McQuaid
e49a043401
cleanup: remove more on --force or --prune.
...
Remove more logs, use the prune time period and remove version control
checkouts when --force or --prune is used.
2015-08-13 10:22:28 +01:00
BrewTestBot
13d544e11e
Core files style updates.
...
Closes Homebrew/homebrew#42354 .
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-03 13:22:35 +01:00
Xu Cheng
602ea66a0f
bottle_resolve_version: return PkgVersion
2015-07-24 15:59:28 +08:00
Xu Cheng
74d99d647d
cleanup: rescue TapFormulaAmbiguityError caused by Dependency#to_formula
...
Closes Homebrew/homebrew#40682 .
Signed-off-by: Xu Cheng <xucheng@me.com>
2015-06-15 12:55:47 +08:00
Xu Cheng
036b9f6913
cleanup: use bottle_resolve_version
...
Closes Homebrew/homebrew#40378 .
Signed-off-by: Xu Cheng <xucheng@me.com>
2015-06-07 23:51:15 +08:00
Xu Cheng
82745ff9b6
cleanup: use Formula#full_name
2015-05-29 17:02:22 +08:00
Xu Cheng
dcf0efc9d2
cleanup: load formula from rack and using ARGV.resolved_formulae
2015-05-27 13:53:41 +08:00
Jack Nagel
a5c9c586ff
Move can_cleanup? off of the formula instance
2015-04-17 22:58:02 -04:00
Jack Nagel
338a08d8d6
Ask the formula if it can be cleaned up once
2015-04-17 22:58:02 -04:00
Jack Nagel
505d06c176
Simplify cleanup eligibility check
2015-04-17 22:58:02 -04:00
Mike McQuaid
451a07cc4e
cleanup: add --prune to delete old cache files.
2015-04-16 17:52:10 -07:00
Jack Nagel
3587dc441e
Remove duplication from cleanup methods
2015-04-07 21:14:48 -04:00
Dominyk Tiller
45c9e84c15
cleanup: display file-sizes
...
Closes Homebrew/homebrew#38404
2015-04-07 18:32:29 +01:00
Jack Nagel
a4ff45e5ee
Use pkg_version when comparing against keg versions
2015-04-01 21:15:18 -04:00
Xu Cheng
89325bbb19
cleanup: optimize perfermance
...
Only remove .DS_Store files from whitelisted directories.
Closes Homebrew/homebrew#37409 .
Signed-off-by: Xu Cheng <xucheng@me.com>
2015-03-07 12:03:36 +08:00
Jack Nagel
ba48d8c5b9
Use version attribute directly in cache comparisons
...
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.
2014-12-27 16:16:16 -05:00
Jack Nagel
8c0928ccca
Use quiet_system to avoid the shell
2014-12-16 15:27:36 -05:00
Mike McQuaid
b6c2c8cdc8
cleanup: only clean cache if it exists.
...
Closes Homebrew/homebrew#33297 .
2014-10-19 12:28:32 +01:00