From 28f26e0c9fc04fcbc78d135d3ea239e5c986963c Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 24 Mar 2015 12:11:40 +0000 Subject: [PATCH] reinstall, upgrade: tweak use of tab build_bottle. In the case where a bottle wasn't around before and is now it probably doesn't make sense to use `build-bottle` to build something that will be identical to the binary bottle package anyway. After all, when you use the bottle you will end up with something that has been built with `build-bottle` anyway (just not by you). --- Library/Homebrew/cmd/reinstall.rb | 2 +- Library/Homebrew/cmd/upgrade.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/cmd/reinstall.rb b/Library/Homebrew/cmd/reinstall.rb index 4b238c0c72..6fe07e3d9f 100644 --- a/Library/Homebrew/cmd/reinstall.rb +++ b/Library/Homebrew/cmd/reinstall.rb @@ -20,7 +20,7 @@ module Homebrew fi = FormulaInstaller.new(f) fi.options = options - fi.build_bottle = ARGV.build_bottle? || tab.build_bottle? + fi.build_bottle = ARGV.build_bottle? || (!f.bottled? && 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 8b30ba59cb..10d323b14f 100644 --- a/Library/Homebrew/cmd/upgrade.rb +++ b/Library/Homebrew/cmd/upgrade.rb @@ -52,7 +52,7 @@ module Homebrew fi = FormulaInstaller.new(f) fi.options = tab.used_options - fi.build_bottle = ARGV.build_bottle? || tab.build_bottle? + fi.build_bottle = ARGV.build_bottle? || (!f.bottled? && tab.build_bottle?) fi.build_from_source = ARGV.build_from_source? fi.verbose = ARGV.verbose? fi.quieter = ARGV.quieter?