FormulaInstaller: don't install bottle if options were passed
This commit is contained in:
parent
5822aa80cf
commit
951872c4be
@ -63,7 +63,6 @@ module Homebrew extend self
|
||||
installer = FormulaInstaller.new(f)
|
||||
installer.tab = tab
|
||||
installer.show_header = false
|
||||
installer.install_bottle = (install_bottle?(f) and tab.used_options.empty?)
|
||||
|
||||
oh1 "Upgrading #{f.name}"
|
||||
|
||||
|
||||
@ -10,14 +10,13 @@ class FormulaInstaller
|
||||
attr :tab, true
|
||||
attr :show_summary_heading, true
|
||||
attr :ignore_deps, true
|
||||
attr :install_bottle, true
|
||||
attr :show_header, true
|
||||
|
||||
def initialize ff
|
||||
@f = ff
|
||||
@show_header = false
|
||||
@ignore_deps = ARGV.ignore_deps? || ARGV.interactive?
|
||||
@install_bottle = install_bottle? ff
|
||||
@options = []
|
||||
|
||||
@@attempted ||= Set.new
|
||||
|
||||
@ -25,6 +24,10 @@ class FormulaInstaller
|
||||
check_install_sanity
|
||||
end
|
||||
|
||||
def pour_bottle?
|
||||
install_bottle?(f) && (tab.used_options.empty? rescue true) && options.empty?
|
||||
end
|
||||
|
||||
def check_install_sanity
|
||||
raise FormulaInstallationAlreadyAttemptedError, f if @@attempted.include? f
|
||||
|
||||
@ -89,7 +92,7 @@ class FormulaInstaller
|
||||
|
||||
@@attempted << f
|
||||
|
||||
if install_bottle
|
||||
if pour_bottle?
|
||||
pour
|
||||
else
|
||||
build
|
||||
@ -104,7 +107,7 @@ class FormulaInstaller
|
||||
f.recursive_requirements.reject(&:satisfied?)
|
||||
end
|
||||
|
||||
needed_reqs.reject!(&:build?) if install_bottle
|
||||
needed_reqs.reject!(&:build?) if pour_bottle?
|
||||
|
||||
unless needed_reqs.empty?
|
||||
puts needed_reqs.map(&:message) * "\n"
|
||||
@ -233,7 +236,7 @@ class FormulaInstaller
|
||||
end
|
||||
|
||||
def build_time
|
||||
@build_time ||= Time.now - @start_time unless install_bottle or ARGV.interactive? or @start_time.nil?
|
||||
@build_time ||= Time.now - @start_time unless pour_bottle? or ARGV.interactive? or @start_time.nil?
|
||||
end
|
||||
|
||||
def build
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user