FormulaInstaller: don't install bottle if options were passed

This commit is contained in:
Jack Nagel committed 2013-01-26 12:14:46 -06:00
1 parent f76a8bdd1f
commit 0551dedf79
2 files changed
+8 -6

No files matched your search

-1
View File
@@ -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}"
+8 -5
View File
@@ -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