From bf9da2532ebf813f447249d621ec6daa51f8f76a Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 10 Dec 2016 19:21:17 +0000 Subject: formula_installer: remove dependency_installer. This is no longer needed as the reason it was added (argument sanitisation) is now done properly. Also, remove `skip_deps_check?` in favour of `ignore_deps?` as it too is no longer needed. --- Library/Homebrew/formula_installer.rb | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'Library') diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 65607d88a..bd1cc9379 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -60,10 +60,6 @@ class FormulaInstaller @pour_failed = false end - def skip_deps_check? - ignore_deps? - end - # When no build tools are available and build flags are passed through ARGV, # it's necessary to interrupt the user before any sort of installation # can proceed. Only invoked when the user has no developer tools. @@ -125,7 +121,7 @@ class FormulaInstaller def prelude Tab.clear_cache - verify_deps_exist unless skip_deps_check? + verify_deps_exist unless ignore_deps? lock check_install_sanity end @@ -147,7 +143,7 @@ class FormulaInstaller def check_install_sanity raise FormulaInstallationAlreadyAttemptedError, formula if @@attempted.include?(formula) - return if skip_deps_check? + return if ignore_deps? recursive_deps = formula.recursive_dependencies unlinked_deps = recursive_deps.map(&:to_formula).select do |dep| @@ -197,7 +193,7 @@ class FormulaInstaller raise BuildToolsError, [formula] end - unless skip_deps_check? + unless ignore_deps? deps = compute_dependencies check_dependencies_bottled(deps) if pour_bottle? && !DevelopmentTools.installed? install_dependencies(deps) @@ -250,7 +246,7 @@ class FormulaInstaller onoe e.message opoo "Bottle installation failed: building from source." raise BuildToolsError, [formula] unless DevelopmentTools.installed? - compute_and_install_dependencies unless skip_deps_check? + compute_and_install_dependencies unless ignore_deps? else @poured_bottle = true end @@ -442,12 +438,6 @@ class FormulaInstaller @show_header = true unless deps.empty? end - class DependencyInstaller < FormulaInstaller - def skip_deps_check? - true - end - end - def install_dependency(dep, inherited_options) df = dep.to_formula tab = Tab.for_formula(df) @@ -463,7 +453,7 @@ class FormulaInstaller installed_keg.rename(tmp_keg) end - fi = DependencyInstaller.new(df) + fi = FormulaInstaller.new(df) fi.options |= tab.used_options fi.options |= Tab.remap_deprecated_options(df.deprecated_options, dep.options) fi.options |= inherited_options -- cgit v1.2.3