aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2011-05-12 08:10:47 -0700
committerAdam Vandenberg2011-05-12 08:10:47 -0700
commitd18978d6fddb7fb045676492a2d867e5a05cead6 (patch)
treeb95ab1f848213c8b0dc964e64fc20fd60ce7e61c /Library
parentec57bcaad9505e84dc09282b265ee6276b988f00 (diff)
downloadhomebrew-d18978d6fddb7fb045676492a2d867e5a05cead6.tar.bz2
brew doctor: check for stray .la files
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/doctor.rb24
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