From 363f2c116cf6256148624c841e62b59c508565f4 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Fri, 28 Mar 2014 14:58:33 +0000 Subject: [PATCH] formula_installer: check pour from requirements. --- Library/Homebrew/formula_installer.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index cf6e289038..a84827a55b 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -55,6 +55,14 @@ class FormulaInstaller return true if f.local_bottle_path return false unless f.bottle && f.pour_bottle? + f.requirements.each do |req| + next if req.optional? || req.pour_bottle? + if install_bottle_options[:warn] + ohai "Building source; bottle blocked by #{req} requirement" + end + return false + end + unless f.bottle.compatible_cellar? if install_bottle_options[:warn] opoo "Building source; cellar of #{f}'s bottle is #{f.bottle.cellar}"