From f36e676bc9e93c4c10d14b3e10e9e2f72bfb25db Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Thu, 13 Mar 2014 19:10:49 -0500 Subject: Don't ignore dependencies when actually building a dependency Since the primary FormulaInstaller instance handles the entire dependency tree, we set ignore_deps to true when instantiated the class for each dependency in over to avoid repeated work. However, now that arguments for the build process are whitelisted instead of blacklisted, we have begun adding "--ignore-dependencies" if ignore_deps is true. This isn't quite right when we are installing a dependency. We want to skip the calculation and installation of *its* dependencies, since the primary installer takes care of that, but we still want to consider them in the build process, so that they are available in the build environment. --- Library/Homebrew/formula_installer.rb | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'Library') diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 38ecf30bf..8bca9d92a 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -335,16 +335,28 @@ class FormulaInstaller @show_header = true unless deps.empty? end + class DependencyInstaller < FormulaInstaller + def initialize ff + super + @ignore_deps = true + end + + def sanitized_ARGV_options + args = super + args.delete "--ignore-dependencies" + args + end + end + def install_dependency(dep, inherited_options) df = dep.to_formula outdated_keg = Keg.new(df.linked_keg.realpath) rescue nil - fi = FormulaInstaller.new(df) + fi = DependencyInstaller.new(df) fi.options |= Tab.for_formula(df).used_options fi.options |= dep.options fi.options |= inherited_options - fi.ignore_deps = true fi.build_from_source = build_from_source? fi.verbose = verbose? unless verbose == :quieter fi.debug = debug? -- cgit v1.2.3