aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorAdam Vandenberg2010-06-29 10:10:53 -0700
committerAdam Vandenberg2010-07-03 22:58:17 -0700
commit14d84be78e5ba15affa009bd0012e3ab2f24d74c (patch)
tree8529911bee95e81dc952086a999f26cad651695a /Library/Homebrew
parent63f6cb03df2d5316f7081f846e595f4bf06eb1a5 (diff)
downloadbrew-14d84be78e5ba15affa009bd0012e3ab2f24d74c.tar.bz2
brew doctor - add whitelist to dylibs
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/brew_doctor.rb29
1 files changed, 21 insertions, 8 deletions
diff --git a/Library/Homebrew/brew_doctor.rb b/Library/Homebrew/brew_doctor.rb
index c4daa06c4..e95cb9198 100644
--- a/Library/Homebrew/brew_doctor.rb
+++ b/Library/Homebrew/brew_doctor.rb
@@ -30,14 +30,27 @@ end
def check_for_stray_dylibs
- bad_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"
- puts "when building Homebrew formula. If you no longer need them, delete them:"
- puts
- puts *bad_dylibs.collect { |f| " #{f}" }
- puts
- end
+ unbrewed_dylibs = Dir['/usr/local/lib/*.dylib'].select { |f| File.file? f and not File.symlink? f }
+
+ # Dylibs which are generally OK should be added to this list,
+ # with a short description of the software they come with.
+ white_list = {
+ "libfuse.2.dylib" => "MacFuse",
+ "libfuse_ino64.2.dylib" => "MacFuse"
+ }
+
+ 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
def check_for_x11