diff options
| author | William Woodruff | 2015-07-26 16:49:16 -0400 |
|---|---|---|
| committer | Misty De Meo | 2015-08-21 11:02:33 -0700 |
| commit | 1face808f5f1dc43c887cab421b5c01f7e20fdf7 (patch) | |
| tree | 0d1308a216ba4b316470c84d3e02e7b09e752803 /Library/Homebrew/cmd | |
| parent | f58506ea6f7000e7e6d3f6538dc5ff2c43ea7926 (diff) | |
| download | brew-1face808f5f1dc43c887cab421b5c01f7e20fdf7.tar.bz2 | |
Add guards to calls that would trigger Xcode install requests
add guard in Formula#file_modified? to prevent git popup
add guard in Superenv.bin before calling MacOS::Xcode.version
add guard against missing Xcode/CLT in Xcode.uncached_version
return nil instread of 0 in uncached_version when Xcode/CLT are not present, to distinguish from linuxbrew behavior
checks against pour_bottle? and needs_relocation?, add guard around keg.relocate_install_names to check pour_bottle?/needs_relocation? as well
needs_relocation? becomes skip_relocation?, use cellar attr to indicate relocation instead of does_not_need_relocation
MacOS.can_build? becomes MacOS.has_apple_developer_tools?
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/config.rb | 10 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/install.rb | 7 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/reinstall.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/upgrade.rb | 2 |
4 files changed, 8 insertions, 13 deletions
diff --git a/Library/Homebrew/cmd/config.rb b/Library/Homebrew/cmd/config.rb index 7627d6e97..74b4f436e 100644 --- a/Library/Homebrew/cmd/config.rb +++ b/Library/Homebrew/cmd/config.rb @@ -7,23 +7,23 @@ module Homebrew end def llvm - @llvm ||= MacOS.llvm_build_version + @llvm ||= MacOS.llvm_build_version if MacOS.has_apple_developer_tools? end def gcc_42 - @gcc_42 ||= MacOS.gcc_42_build_version + @gcc_42 ||= MacOS.gcc_42_build_version if MacOS.has_apple_developer_tools? end def gcc_40 - @gcc_40 ||= MacOS.gcc_40_build_version + @gcc_40 ||= MacOS.gcc_40_build_version if MacOS.has_apple_developer_tools? end def clang - @clang ||= MacOS.clang_version + @clang ||= MacOS.clang_version if MacOS.has_apple_developer_tools? end def clang_build - @clang_build ||= MacOS.clang_build_version + @clang_build ||= MacOS.clang_build_version if MacOS.has_apple_developer_tools? end def xcode diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index f41450be1..41628b435 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -40,7 +40,7 @@ module Homebrew # if the user's flags will prevent bottle only-installations when no # developer tools are available, we need to stop them early on - FormulaInstaller.prevent_build_flags unless MacOS.can_build? + FormulaInstaller.prevent_build_flags unless MacOS.has_apple_developer_tools? ARGV.formulae.each do |f| # head-only without --HEAD is an error @@ -126,11 +126,6 @@ module Homebrew end def check_xcode - # TODO: reinstate check_for_bad_install_name_tool and check_for_installed_developer_tools - # currently check_for_bad_install_name_tool fails because it tries to call - # the /usr/bin/otool stub program on systems without XCode/CLT - # check_for_installed_developer_tools doesn't fail, but produces a warning - # when one is no longer required checks = Checks.new %w[ check_for_unsupported_osx diff --git a/Library/Homebrew/cmd/reinstall.rb b/Library/Homebrew/cmd/reinstall.rb index 4de1ad9c2..3c6f9ac20 100644 --- a/Library/Homebrew/cmd/reinstall.rb +++ b/Library/Homebrew/cmd/reinstall.rb @@ -2,7 +2,7 @@ require "formula_installer" module Homebrew def reinstall - FormulaInstaller.prevent_build_flags unless MacOS.can_build? + FormulaInstaller.prevent_build_flags unless MacOS.has_apple_developer_tools? ARGV.resolved_formulae.each { |f| reinstall_formula(f) } end diff --git a/Library/Homebrew/cmd/upgrade.rb b/Library/Homebrew/cmd/upgrade.rb index 9bb5d46ad..fb122a659 100644 --- a/Library/Homebrew/cmd/upgrade.rb +++ b/Library/Homebrew/cmd/upgrade.rb @@ -3,7 +3,7 @@ require "cmd/outdated" module Homebrew def upgrade - FormulaInstaller.prevent_build_flags unless MacOS.can_build? + FormulaInstaller.prevent_build_flags unless MacOS.has_apple_developer_tools? Homebrew.perform_preinstall_checks |
