Remove args from FormulaInstaller.

This commit is contained in:
Markus Reiter 2020-07-29 02:19:07 +02:00
parent 05365b5542
commit 6b0678e8ed
4 changed files with 7 additions and 18 deletions

View File

@ -327,8 +327,7 @@ module Homebrew
include_test: args.include_test?, include_test: args.include_test?,
include_test_formulae: args.include_test_formulae, include_test_formulae: args.include_test_formulae,
build_from_source: args.build_from_source?, build_from_source: args.build_from_source?,
build_from_source_formulae: args.build_from_source_formulae, build_from_source_formulae: args.build_from_source_formulae)
args: args)
fi.options = build_options.used_options fi.options = build_options.used_options
fi.env = args.env fi.env = args.env
fi.force = args.force? fi.force = args.force?

View File

@ -39,7 +39,7 @@ class FormulaInstaller
end end
attr_reader :formula attr_reader :formula
attr_accessor :cc, :env, :args, :options, :build_bottle, :bottle_arch, attr_accessor :cc, :env, :options, :build_bottle, :bottle_arch,
:build_from_source_formulae, :include_test_formulae, :build_from_source_formulae, :include_test_formulae,
:installed_as_dependency, :installed_on_request, :link_keg, :other_installers :installed_as_dependency, :installed_on_request, :link_keg, :other_installers
@ -52,8 +52,7 @@ class FormulaInstaller
force_bottle: false, force_bottle: false,
include_test: false, include_test_formulae: [], include_test: false, include_test_formulae: [],
build_from_source: false, build_from_source_formulae: [], build_from_source: false, build_from_source_formulae: [],
cc: nil, args: nil) cc: nil)
@args = args
@formula = formula @formula = formula
@env = nil @env = nil
@force = false @force = false
@ -599,8 +598,7 @@ class FormulaInstaller
df = dep.to_formula df = dep.to_formula
fi = FormulaInstaller.new(df, force_bottle: false, fi = FormulaInstaller.new(df, force_bottle: false,
include_test: include_test_formulae.include?(df.full_name), include_test: include_test_formulae.include?(df.full_name),
build_from_source: build_from_source_formulae.include?(df.full_name), build_from_source: build_from_source_formulae.include?(df.full_name))
args: args)
fi.force = force? fi.force = force?
fi.keep_tmp = keep_tmp? fi.keep_tmp = keep_tmp?
@ -641,8 +639,7 @@ class FormulaInstaller
fi = FormulaInstaller.new(df, force_bottle: false, fi = FormulaInstaller.new(df, force_bottle: false,
include_test: include_test_formulae.include?(df.full_name), include_test: include_test_formulae.include?(df.full_name),
build_from_source: build_from_source_formulae.include?(df.full_name), build_from_source: build_from_source_formulae.include?(df.full_name))
args: args)
fi.options |= tab.used_options fi.options |= tab.used_options
fi.options |= Tab.remap_deprecated_options(df.deprecated_options, dep.options) fi.options |= Tab.remap_deprecated_options(df.deprecated_options, dep.options)
@ -780,12 +777,6 @@ class FormulaInstaller
args << "--devel" args << "--devel"
end end
formula.options.each do |opt|
name = opt.name[/^([^=]+)=$/, 1]
value = self.args&.value(name) if name
args << "--#{name}=#{value}" if value
end
args args
end end

View File

@ -25,8 +25,7 @@ module Homebrew
fi = FormulaInstaller.new(f, force_bottle: args.force_bottle?, fi = FormulaInstaller.new(f, force_bottle: args.force_bottle?,
build_from_source: args.build_from_source?, build_from_source: args.build_from_source?,
build_from_source_formulae: args.build_from_source_formulae, build_from_source_formulae: args.build_from_source_formulae)
args: args)
fi.options = options fi.options = options
fi.force = args.force? fi.force = args.force?
fi.keep_tmp = args.keep_tmp? fi.keep_tmp = args.keep_tmp?

View File

@ -64,7 +64,7 @@ module Homebrew
options &= f.options options &= f.options
fi = FormulaInstaller.new(f, force_bottle: args.force_bottle?, include_test: args.include_test?, fi = FormulaInstaller.new(f, force_bottle: args.force_bottle?, include_test: args.include_test?,
build_from_source: args.build_from_source?, args: args) build_from_source: args.build_from_source?)
fi.options = options fi.options = options
fi.force = args.force? fi.force = args.force?
fi.keep_tmp = args.keep_tmp? fi.keep_tmp = args.keep_tmp?