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_formulae: args.include_test_formulae,
build_from_source: args.build_from_source?,
build_from_source_formulae: args.build_from_source_formulae,
args: args)
build_from_source_formulae: args.build_from_source_formulae)
fi.options = build_options.used_options
fi.env = args.env
fi.force = args.force?

View File

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

View File

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

View File

@ -64,7 +64,7 @@ module Homebrew
options &= f.options
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.force = args.force?
fi.keep_tmp = args.keep_tmp?