doctor: Add check for install_name_tool
Closes Homebrew/homebrew#29593.
This commit is contained in:
		
							parent
							
								
									3df975897c
								
							
						
					
					
						commit
						8cb980f7be
					
				@ -312,6 +312,20 @@ def check_for_stray_developer_directory
 | 
				
			|||||||
  end
 | 
					  end
 | 
				
			||||||
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
 | 
					def __check_subdir_access base
 | 
				
			||||||
  target = HOMEBREW_PREFIX+base
 | 
					  target = HOMEBREW_PREFIX+base
 | 
				
			||||||
  return unless target.exist?
 | 
					  return unless target.exist?
 | 
				
			||||||
 | 
				
			|||||||
@ -55,6 +55,7 @@ module Homebrew extend self
 | 
				
			|||||||
      check_for_installed_developer_tools
 | 
					      check_for_installed_developer_tools
 | 
				
			||||||
      check_xcode_license_approved
 | 
					      check_xcode_license_approved
 | 
				
			||||||
      check_for_osx_gcc_installer
 | 
					      check_for_osx_gcc_installer
 | 
				
			||||||
 | 
					      check_for_bad_install_name_tool
 | 
				
			||||||
    ].each do |check|
 | 
					    ].each do |check|
 | 
				
			||||||
      out = checks.send(check)
 | 
					      out = checks.send(check)
 | 
				
			||||||
      opoo out unless out.nil?
 | 
					      opoo out unless out.nil?
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user