From 008eaac60da0bfaba4e54fb0febeb172b7976898 Mon Sep 17 00:00:00 2001 From: Shaun Jackman Date: Wed, 30 Aug 2017 09:24:55 -0700 Subject: [PATCH 1/2] pour_bottle?: Ensure local bottles are compatible Don't ignore f.pour_bottle? and compatible_cellar? when pouring a local bottle. --force-bottle may be used to pour a local bottle that is incompatible, as it is for remote bottles. --- Library/Homebrew/formula_installer.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 6c5b8bdabba90..5aa06e9f0cc05 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -91,7 +91,6 @@ def pour_bottle?(install_bottle_options = { warn: false }) return false if ARGV.cc return false unless options.empty? return false if formula.bottle_disabled? - return true if formula.local_bottle_path unless formula.pour_bottle? if install_bottle_options[:warn] && formula.pour_bottle_check_unsatisfied_reason opoo <<-EOS.undent From 4cfd333c5a9fd32f1d9870b3e4987c7dad76a88a Mon Sep 17 00:00:00 2001 From: Shaun Jackman Date: Tue, 29 Aug 2017 11:48:47 -0700 Subject: [PATCH 2/2] pour_bottle?: Pour local bottles without sha256 Pouring a local bottle for a formula without a bottle sha256 in the formula for that OS would unexpectedly install from source instead. --- Library/Homebrew/formula_installer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 5aa06e9f0cc05..216a375ce97e9 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -85,7 +85,7 @@ def pour_bottle?(install_bottle_options = { warn: false }) return false if @pour_failed bottle = formula.bottle - return false unless bottle + return false if !bottle && !formula.local_bottle_path return true if force_bottle? return false if build_from_source? || build_bottle? || interactive? return false if ARGV.cc