Merge pull request #1275 from woodruffw/goodbye-cctools

formula_installer: Remove obsolete hard dependency on cctools.
This commit is contained in:
Mike McQuaid 2016-10-15 11:47:29 +01:00 committed by GitHub
commit 13276409a9
2 changed files with 0 additions and 28 deletions

View File

@ -12,7 +12,6 @@ require "cmd/postinstall"
require "hooks/bottles" require "hooks/bottles"
require "debrew" require "debrew"
require "sandbox" require "sandbox"
require "requirements/cctools_requirement"
require "emoji" require "emoji"
require "development_tools" require "development_tools"
@ -234,7 +233,6 @@ class FormulaInstaller
pour_bottle = pour_bottle?(warn: true) pour_bottle = pour_bottle?(warn: true)
if pour_bottle if pour_bottle
begin begin
install_relocation_tools unless formula.bottle_specification.skip_relocation?
pour pour
rescue Exception => e rescue Exception => e
# any exceptions must leave us with nothing installed # any exceptions must leave us with nothing installed
@ -434,19 +432,6 @@ class FormulaInstaller
@show_header = true unless deps.empty? @show_header = true unless deps.empty?
end end
# Installs the relocation tools (as provided by the cctools formula) as a hard
# dependency for every formula installed from a bottle when the user has no
# developer tools. Invoked unless the formula explicitly sets
# :any_skip_relocation in its bottle DSL.
def install_relocation_tools
cctools = CctoolsRequirement.new
dependency = cctools.to_dependency
formula = dependency.to_formula
return if cctools.satisfied? || @@attempted.include?(formula)
install_dependency(dependency, inherited_options_for(cctools))
end
class DependencyInstaller < FormulaInstaller class DependencyInstaller < FormulaInstaller
def skip_deps_check? def skip_deps_check?
true true

View File

@ -1,13 +0,0 @@
# Represents a general requirement for utilities normally installed by Xcode,
# the CLT, or provided by the cctools formula. In particular, this requirement
# allows Homebrew to pull in the cctools formula and use its utilities to
# perform relocation operations on systems that do not have either Xcode or the
# CLT installed (but still want to install bottled formulae).
class CctoolsRequirement < Requirement
fatal true
default_formula "cctools"
satisfy(build_env: false) do
MacOS::Xcode.installed? || MacOS::CLT.installed? || Formula["cctools"].installed?
end
end