Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

formula_installer: simplify callers. #2959

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 0 additions & 5 deletions Library/Homebrew/cmd/install.rb
Expand Up @@ -330,13 +330,8 @@ def install_formula(f)
fi.ignore_deps = ARGV.ignore_deps?
fi.only_deps = ARGV.only_deps?
fi.build_bottle = ARGV.build_bottle?
fi.build_from_source = ARGV.build_from_source? || ARGV.build_all_from_source?
fi.force_bottle = ARGV.force_bottle?
fi.interactive = ARGV.interactive?
fi.git = ARGV.git?
fi.verbose = ARGV.verbose?
fi.quieter = ARGV.quieter?
fi.debug = ARGV.debug?
fi.prelude
fi.install
fi.finish
Expand Down
4 changes: 0 additions & 4 deletions Library/Homebrew/cmd/reinstall.rb
Expand Up @@ -35,12 +35,8 @@ def reinstall_formula(f)
fi.options = options
fi.invalid_option_names = build_options.invalid_option_names
fi.build_bottle = ARGV.build_bottle? || (!f.bottled? && f.build.bottle?)
fi.build_from_source = ARGV.build_from_source? || ARGV.build_all_from_source?
fi.force_bottle = ARGV.force_bottle?
fi.interactive = ARGV.interactive?
fi.git = ARGV.git?
fi.verbose = ARGV.verbose?
fi.debug = ARGV.debug?
fi.prelude

oh1 "Reinstalling #{f.full_name} #{options.to_a.join " "}"
Expand Down
4 changes: 0 additions & 4 deletions Library/Homebrew/cmd/upgrade.rb
Expand Up @@ -116,10 +116,6 @@ def upgrade_formula(f)
fi.options = f.build.used_options
fi.options &= f.options
fi.build_bottle = ARGV.build_bottle? || (!f.bottled? && f.build.build_bottle?)
fi.build_from_source = ARGV.build_from_source? || ARGV.build_all_from_source?
fi.verbose = ARGV.verbose?
fi.quieter = ARGV.quieter?
fi.debug = ARGV.debug?
fi.installed_on_request = !ARGV.named.empty?
if tab
fi.installed_as_dependency = tab.installed_as_dependency
Expand Down
15 changes: 8 additions & 7 deletions Library/Homebrew/formula_installer.rb
Expand Up @@ -44,14 +44,14 @@ def initialize(formula)
@show_header = false
@ignore_deps = false
@only_deps = false
@build_from_source = false
@build_bottle = false
@force_bottle = false
@build_from_source = ARGV.build_from_source? || ARGV.build_all_from_source?
@build_bottle = ARGV.build_bottle?
@force_bottle = ARGV.force_bottle?
@interactive = false
@git = false
@verbose = false
@quieter = false
@debug = false
@verbose = ARGV.verbose?
@quieter = ARGV.quieter?
@debug = ARGV.debug?
@installed_as_dependency = false
@installed_on_request = true
@options = Options.new
Expand Down Expand Up @@ -539,7 +539,8 @@ def install_dependency(dep, inherited_options)
fi.options |= inherited_options
fi.options &= df.options
fi.build_from_source = ARGV.build_formula_from_source?(df)
fi.verbose = verbose? && !quieter?
fi.verbose = verbose?
fi.quieter = quieter?
fi.debug = debug?
fi.installed_as_dependency = true
fi.installed_on_request = false
Expand Down