aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorMike McQuaid2015-03-24 12:11:40 +0000
committerMike McQuaid2015-03-24 12:11:40 +0000
commit28f26e0c9fc04fcbc78d135d3ea239e5c986963c (patch)
treea03efb6a14a18189ca10c312cc49cea70192355d /Library/Homebrew
parent959d92a84a333343cd441dd471a8ab01af5c465a (diff)
downloadbrew-28f26e0c9fc04fcbc78d135d3ea239e5c986963c.tar.bz2
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).
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/cmd/reinstall.rb2
-rw-r--r--Library/Homebrew/cmd/upgrade.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/reinstall.rb b/Library/Homebrew/cmd/reinstall.rb
index 4b238c0c7..6fe07e3d9 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 8b30ba59c..10d323b14 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?