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

brew doctor - add whitelist to dylibs

parent 63f6cb03
No related branches found
No related tags found
No related merge requests found
...@@ -30,14 +30,27 @@ end ...@@ -30,14 +30,27 @@ end
def check_for_stray_dylibs def check_for_stray_dylibs
bad_dylibs = Dir['/usr/local/lib/*.dylib'].select { |f| File.file? f and not File.symlink? f } unbrewed_dylibs = Dir['/usr/local/lib/*.dylib'].select { |f| File.file? f and not File.symlink? f }
if bad_dylibs.length > 0
puts "You have unbrewed dylibs in /usr/local/lib. These could cause build problems" # Dylibs which are generally OK should be added to this list,
puts "when building Homebrew formula. If you no longer need them, delete them:" # with a short description of the software they come with.
puts white_list = {
puts *bad_dylibs.collect { |f| " #{f}" } "libfuse.2.dylib" => "MacFuse",
puts "libfuse_ino64.2.dylib" => "MacFuse"
end }
bad_dylibs = unbrewed_dylibs.reject {|d| white_list.key? File.basename(d) }
return if bad_dylibs.empty?
opoo "Unbrewed dylibs were found in /usr/local/lib"
puts <<-EOS.undent
You have unbrewed dylibs in /usr/local/lib. If you didn't put them there on purpose,
they could cause problems when building Homebrew formulae.
Unexpected dylibs (delete if they are no longer needed):
EOS
puts *bad_dylibs.collect { |f| " #{f}" }
puts
end end
def check_for_x11 def check_for_x11
......
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