diff options
| author | Adam Vandenberg | 2011-05-12 08:10:47 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2011-05-12 08:10:47 -0700 |
| commit | d44a0561ea00241a77f47fb4223a226ca073a07e (patch) | |
| tree | 712d1b4718961d4cf5f038ab554e92a9eb450e18 /Library/Homebrew/cmd | |
| parent | 8fea11e7646cd0b822927d480df2791af225a979 (diff) | |
| download | brew-d44a0561ea00241a77f47fb4223a226ca073a07e.tar.bz2 | |
brew doctor: check for stray .la files
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/doctor.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index 610b6ce9a..526747b57 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -113,6 +113,29 @@ def check_for_stray_pcs puts end +def check_for_stray_las + unbrewed_las = Dir['/usr/local/lib/*.la'].select { |f| File.file? f and not File.symlink? f } + + white_list = { + "libfuse.la" => "MacFuse", + "libfuse_ino64.la" => "MacFuse", + } + + bad_las = unbrewed_las.reject {|d| white_list.key? File.basename(d) } + return if bad_las.empty? + + puts <<-EOS.undent + Unbrewed .la files were found in /usr/local/lib. + + If you didn't put them there on purpose they could cause problems when + building Homebrew formulae, and may need to be deleted. + + Unexpected .la files: + EOS + puts *bad_las.collect { |f| " #{f}" } + puts +end + def check_for_x11 unless x11_installed? puts <<-EOS.undent @@ -663,6 +686,7 @@ module Homebrew extend self check_for_stray_dylibs check_for_stray_static_libs check_for_stray_pcs + check_for_stray_las check_gcc_versions check_for_other_package_managers check_for_x11 |
