diff --git a/Library/Homebrew/cmd/reinstall.rb b/Library/Homebrew/cmd/reinstall.rb index 113607236d..b72fbad091 100644 --- a/Library/Homebrew/cmd/reinstall.rb +++ b/Library/Homebrew/cmd/reinstall.rb @@ -20,8 +20,7 @@ module Homebrew fi = FormulaInstaller.new(f) fi.options = options - fi.build_bottle = ARGV.build_bottle? - fi.build_bottle ||= tab.built_as_bottle && !tab.poured_from_bottle + fi.build_bottle = ARGV.build_bottle? || tab.build_bottle? fi.build_from_source = ARGV.build_from_source? fi.force_bottle = ARGV.force_bottle? fi.verbose = ARGV.verbose? diff --git a/Library/Homebrew/cmd/upgrade.rb b/Library/Homebrew/cmd/upgrade.rb index 8f1b7fabee..c5b875d318 100644 --- a/Library/Homebrew/cmd/upgrade.rb +++ b/Library/Homebrew/cmd/upgrade.rb @@ -53,8 +53,7 @@ module Homebrew fi = FormulaInstaller.new(f) fi.options = tab.used_options - fi.build_bottle = ARGV.build_bottle? - fi.build_bottle ||= tab.built_as_bottle && !tab.poured_from_bottle + fi.build_bottle = ARGV.build_bottle? || tab.build_bottle? fi.build_from_source = ARGV.build_from_source? fi.verbose = ARGV.verbose? fi.verbose &&= :quieter if ARGV.quieter? diff --git a/Library/Homebrew/tab.rb b/Library/Homebrew/tab.rb index ea619d57c4..96639fb208 100644 --- a/Library/Homebrew/tab.rb +++ b/Library/Homebrew/tab.rb @@ -121,6 +121,10 @@ class Tab < OpenStruct CxxStdlib.create(lib, cc.to_sym) end + def build_bottle? + built_as_bottle && !poured_from_bottle + end + def to_json Utils::JSON.dump({ :used_options => used_options.as_flags,