Skip to content
Snippets Groups Projects
Commit 1f86923e authored by Adam Vandenberg's avatar Adam Vandenberg
Browse files

ignore skip_clean :all

parent 9559e162
No related branches found
No related tags found
No related merge requests found
......@@ -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$/
......
......@@ -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
......
......@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment