Honor build options and bottles when upgrading

Fixes Homebrew/homebrew#11552.
Closes Homebrew/homebrew#11777.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
Nicolas Despres 2012-04-20 17:07:45 +02:00 committed by Jack Nagel
parent 32ea2e3ad0
commit c2fdcf1a34
2 changed files with 7 additions and 1 deletions

View File

@ -54,6 +54,7 @@ module Homebrew extend self
installer = FormulaInstaller.new(f, tab)
installer.show_header = false
installer.install_bottle = install_bottle?(f) and tab.used_options.empty?
oh1 "Upgrading #{f.name}"

View File

@ -182,7 +182,12 @@ class FormulaInstaller
args = ARGV.clone
unless args.include? '--fresh'
args.concat tab.used_options unless tab.nil?
unless tab.nil?
args.concat tab.used_options
# FIXME: enforce the download of the non-bottled package
# in the spawned Ruby process.
args << '--build-from-source'
end
args.uniq! # Just in case some dupes were added
end