diff options
| author | Adam Vandenberg | 2014-02-23 12:09:28 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2014-02-23 15:53:26 -0800 |
| commit | 1f86923ec22388f5ced7e0ef0e767738be16b9ae (patch) | |
| tree | 2b22595a5298c6dd79276cf0087685ee4f16db91 /Library | |
| parent | 9559e162b2880e571856c7f2d2e788c61823191a (diff) | |
| download | brew-1f86923ec22388f5ced7e0ef0e767738be16b9ae.tar.bz2 | |
ignore skip_clean :all
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/audit.rb | 3 | ||||
| -rw-r--r-- | Library/Homebrew/formula.rb | 19 | ||||
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 8 |
3 files changed, 6 insertions, 24 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 4c44de2c1..71445ca4d 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -447,7 +447,8 @@ class FormulaAuditor end if line =~ /skip_clean\s+:all/ - problem "`skip_clean :all` is deprecated; brew no longer strips symbols" + problem "`skip_clean :all` is deprecated; brew no longer strips symbols\n" + + "\tPass explicit paths to prevent Homebrew from removing empty folders." end if line =~ /depends_on [A-Z][\w:]+\.new$/ diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index e48d21a2c..f1a2f0de1 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -247,12 +247,11 @@ class Formula end end - # sometimes the clean process breaks things + # sometimes the cleaner breaks things # skip cleaning paths in a formula with a class method like this: - # skip_clean [bin+"foo", lib+"bar"] - # redefining skip_clean? now deprecated + # skip_clean bin/"foo", lib/"bar" + # skip_clean :la def skip_clean? path - return true if self.class.skip_clean_all? return true if path.extname == '.la' and self.class.skip_clean_paths.include? :la to_check = path.relative_path_from(prefix).to_s self.class.skip_clean_paths.include? to_check @@ -745,20 +744,10 @@ class Formula def skip_clean *paths paths.flatten! - - # :all is deprecated though - if paths.include? :all - @skip_clean_all = true - return - end - + # Specifying :all is deprecated and will become an error skip_clean_paths.merge(paths) end - def skip_clean_all? - @skip_clean_all - end - def skip_clean_paths @skip_clean_paths ||= Set.new end diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 0a6031d42..c74687a98 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -482,14 +482,6 @@ class FormulaInstaller def clean ohai "Cleaning" if ARGV.verbose? - if f.class.skip_clean_all? - opoo "skip_clean :all is deprecated" - puts "Skip clean was commonly used to prevent brew from stripping binaries." - puts "brew no longer strips binaries, if skip_clean is required to prevent" - puts "brew from removing empty directories, you should specify exact paths" - puts "in the formula." - return - end Cleaner.new(f).clean rescue Exception => e opoo "The cleaning step did not complete successfully" |
