ignore skip_clean :all
This commit is contained in:
parent
9559e162b2
commit
1f86923ec2
@ -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"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user