61 Commits

Author SHA1 Message Date
Markus Reiter
1b732ec7b2 Fix RuboCop offenses. 2020-11-16 02:05:29 +01:00
Rylan Polster
50890ebd51 fix Lint/DuplicateBranch style 2020-11-16 02:02:52 +01:00
EricFromCanada
3768b7a6e9 apidoc: update comment wording, punctuation, formatting 2020-11-06 00:21:02 -05:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Mike McQuaid
3a91c37e66
Fix RuboCop checks. 2020-08-19 17:12:32 +01:00
Markus Reiter
490e503b1b Replace Homebrew.args with Context. 2020-08-06 16:13:14 +02:00
Markus Reiter
add10377b8 Pass debug? and verbose? to Cleaner. 2020-08-06 16:12:52 +02:00
Mike McQuaid
bc27e38f18
Remove ARGV.debug?
Replace with `Homebrew.args.debug?`.

Part of #5730.
2020-05-23 14:38:58 +01:00
Gautham Goli
acde828a45 ARGV: Replace ARGV.verbose? with Homebrew.args.verbose? 2020-02-02 14:00:04 +01:00
EricFromCanada
9bfd597991 Format debug messages with odebug 2019-12-02 11:33:19 -05:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Marc Seeger
8457fa5af5
Fix 2nd typo in cleaner.rb 2019-04-08 10:33:49 -07:00
Marc Seeger
4f8489faa1
Fix typo in cleaner.rb
Seems like auto-correct was a bit too eager to fix things :) ?
2019-04-08 10:24:56 -07:00
Mike McQuaid
d64429a736
rubocop: enable Style/IfUnlessModifier. 2019-02-21 12:55:49 +00:00
Bryce Glover
72a95edcfb [cleaner.rb] clean_dirs: Remove symbolic links if they point to static libra-
ries.

Reopens Homebrew/homebrew-core#35269.
Closes Homebrew/homebrew-core#35269.
2019-01-30 19:22:10 -05:00
EricFromCanada
20167e5f1b Adjust comments to tidy API docs output. 2018-10-18 21:42:43 -04:00
Markus Reiter
a5b11a6a5c Fix Style/GuardClause. 2016-09-23 15:30:07 +02:00
Dominyk Tiller
202f793d8a
cleaner: kill unnecessary perl elements
We shouldn't be packaging either `perllocal.pod` or `.packlist` files. Both
are only really useful outside of package management. They get automatically
generated whenever you install a Perl module.

Debian, Arch, MacPorts & others remove them and we should have been as well
really; keeping them causes completely unnecessary conflicts between formulae.
2016-07-31 03:44:29 +01:00
Mike McQuaid
cdf4f42ab9 cleaner: fix generic executable handling. (#498)
Don't unset things that are already set as executable for the generic path.
OS X overrides this behaviour and detects if it's an MachO executable but
there's no cross-OS generic equivalent so just fall back to whatever the build
system has set.
2016-07-12 19:47:27 +01:00
Mike McQuaid
fe29cc2920 cleaner: port to generic OS. (#447) 2016-07-04 16:10:24 +01: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
Xu Cheng
d62095710f More core files style updates 2015-08-03 20:38:20 +08: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
Adam Vandenberg
95d16ef1ba don't clean libexec 2014-09-26 18:22:19 -07:00
Adam Vandenberg
8b5397fa28 improve comment 2014-07-20 12:17:06 -07:00
Adam Vandenberg
929fd44082 use ObserverPathnameExtension to remove these files 2014-07-20 12:17:06 -07:00
Adam Vandenberg
557f887f24 add clarifying comments 2014-07-20 12:17:06 -07:00
Adam Vandenberg
b0138e447d fix comment 2014-07-19 23:28:39 -07:00
Adam Vandenberg
a78b906389 inline this method 2014-05-12 21:22:13 -07:00
Adam Vandenberg
f5cc07dfea add more documentation 2014-02-25 20:24:34 -08:00
Adam Vandenberg
0bdce89d65 fix incorrect comment 2014-02-25 20:24:34 -08:00
Adam Vandenberg
3a4a529453 remove charset.alias directly 2014-02-25 20:24:34 -08:00
Adam Vandenberg
9559e162b2 Cleaner: do work in clean instead of constructor 2014-02-23 15:53:25 -08:00
Adam Vandenberg
bb5a2b587e Always keep info files
Closes Homebrew/homebrew#26659.
2014-02-23 08:30:50 -08:00
Jack Nagel
3cec3e36e9 cleaner: use ObserverPathnameExtension 2013-12-22 13:43:51 -06:00
Jack Nagel
095d83d10b cleaner: reorganize clean_dir to avoid repeated conditional 2013-12-22 13:43:50 -06:00
Jack Nagel
d19934dcb7 cleaner: clean up broken and orphaned symlinks 2013-12-21 23:28:04 -06:00
Jack Nagel
e480206464 cleaner: fix permission debug output 2013-12-21 23:28:03 -06:00
Jack Nagel
e5cd33c7a9 cleaner: don't change permissions on paths marked skip_clean 2013-08-28 12:00:06 -05:00
Jack Nagel
ab60b0114a cleaner: traverse directories in postorder 2013-08-08 20:52:52 -05:00
Adam Vandenberg
f85863cbd0 Clean the cleaner
* Fix a comment; we pass in formulae not names
* Don't pass the formula to factory; this is just a pass-through
* Move require to top-level
2013-06-23 12:54:28 -07:00
Jack Nagel
56fa23e07e cleaner: simplify verbose pathname extension 2013-03-18 00:11:49 -05:00
Adam Vandenberg
12d2900231 Show permission changes in debug mode 2013-02-10 08:55:09 -08:00
Adam Vandenberg
47dcc3f770 Cleaner: allow non-empty paths to be pruned from cleaning 2013-01-08 21:27:30 -08:00
Adam Vandenberg
fd1fd78a94 Cleaner: add (commented-out) debugging information for permission changes
The cleaning step changes permissions on files. Added a commented-out block
that will show permission changes when doing verbose builds.

Since this output is not generally useful for even normal verbose builds,
added as commented-out code (I'm sorry) so that maintainers can uncomment
it when this functionality is needed for debugging.
2012-10-24 09:20:56 -07:00
Max Howell
12d17155cf If we delete stuff in the clean step, make fuss
/cc @jwheare
2012-09-18 16:27:34 -04:00
Adam Vandenberg
54618074a1 Stop stripping binary files 2012-07-05 21:54:31 -07:00
samueljohn
725feb3db1 Core change: XCode only install, with CLT or both
Allow XCode without the Command Line Tools to
work with homebrew, so it's not necessary
to register an Apple Dev ID and/or go to the
XCode prefs and download the CLT. Yay!

Further, this commit allows to use the CLT
solely (without the need for XCode).
Saves quite some megs.
(Some furmulae require xcodebuild)

Of course XCode together with the CLT is still
fine and has been tested on 10.7 and 10.6
with Xcode 4 and Xcode 3.

Only on Lion or above, tell the user about the options,
which are
- Xcode without CLT
- CLT without Xcode
- both (ok, it's not directly stated, but implicit)
So if no Xcode is found and we are on Lion or above,
we don't fail but check for the CLTs now.
For older Macs, the old message that Xcode is needed
and the installer should be run is still displayed.
If the CLT are not found but Xcode is, then we
print out about the experimental status of this setup.

Closes Homebrew/homebrew#10510.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-06-24 19:11:06 -07:00
Jack Nagel
2a6575ad28 cleaner: use new Mach-O pathname methods in clean_file
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-30 22:32:49 -05:00
Jack Nagel
d60f4ffcd8 Restore cleaning of lib/charset.alias
Even though we now prevent linking of this file into the prefix in
Keg#link, its presence still triggers a "non-lib in lib" warning during
installation. So keep cleaning it, and leave the check in Keg#link so
things that skip_clean 'lib' still won't have it linked.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-09 12:41:22 -06:00