diff options
| author | Misty De Meo | 2014-06-03 22:49:51 -0700 | 
|---|---|---|
| committer | Misty De Meo | 2014-06-03 22:50:37 -0700 | 
| commit | 8899c0416ea0f6a4ddf2bc2e01756d9a2d5f1041 (patch) | |
| tree | 4023fd6fa59826b449b47770c802dcc4ddc5e0ef /Library/Homebrew/cmd | |
| parent | 1b35e9c4448adc0d0f7a9571591c1758ef8ae26c (diff) | |
| download | homebrew-8899c0416ea0f6a4ddf2bc2e01756d9a2d5f1041.tar.bz2 | |
doctor: Add check for install_name_tool
Closes #29593.
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/doctor.rb | 14 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/install.rb | 1 | 
2 files changed, 15 insertions, 0 deletions
| diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index 3bd5d4d98..94304b372 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -312,6 +312,20 @@ def check_for_stray_developer_directory    end  end +def check_for_bad_install_name_tool +  return if MacOS.version < 10.9 + +  libs = `otool -L /usr/bin/install_name_tool` +  unless libs.include? "/usr/lib/libxcselect.dylib" then <<-EOS.undent +    You have an outdated version of /usr/bin/install_name_tool installed. +    This will cause binary package installations to fail. +    This can happen if you install osx-gcc-installer or RailsInstaller. +    To restore it, you must reinstall OS X or restore the binary from +    the OS packages. +    EOS +  end +end +  def __check_subdir_access base    target = HOMEBREW_PREFIX+base    return unless target.exist? diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index cf652b17a..55385154d 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -55,6 +55,7 @@ module Homebrew extend self        check_for_installed_developer_tools        check_xcode_license_approved        check_for_osx_gcc_installer +      check_for_bad_install_name_tool      ].each do |check|        out = checks.send(check)        opoo out unless out.nil? | 
