diff options
| author | Mike McQuaid | 2014-07-06 17:22:56 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2014-07-09 16:50:23 -0700 |
| commit | a0a93f1b3b7b2be9b8a319be91086ffe220f8e32 (patch) | |
| tree | 8fdba904f7577a33ae458419d0e5fde48710b8cf /Library/Homebrew/formula_installer.rb | |
| parent | 731aed5bb9e4b9e75792333cd611ae2a886ae7ff (diff) | |
| download | homebrew-a0a93f1b3b7b2be9b8a319be91086ffe220f8e32.tar.bz2 | |
formula_installer: bottle against Homebrew Python.
Diffstat (limited to 'Library/Homebrew/formula_installer.rb')
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 4d929de98..bf49d45de 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -58,14 +58,6 @@ 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}" @@ -247,6 +239,13 @@ class FormulaInstaller raise UnsatisfiedRequirements.new(f, fatals) unless fatals.empty? end + def install_requirement_default_formula?(req) + return false unless req.default_formula? + return false if req.optional? + return true unless req.satisfied? + pour_bottle? || build_bottle? + end + def expand_requirements unsatisfied_reqs = Hash.new { |h, k| h[k] = [] } deps = [] @@ -263,13 +262,13 @@ class FormulaInstaller Requirement.prune elsif req.build? && dependent != f && install_bottle_for_dep?(dependent, build) Requirement.prune - elsif req.satisfied? - Requirement.prune - elsif req.default_formula? + elsif install_requirement_default_formula?(req) dep = req.to_dependency deps.unshift(dep) formulae.unshift(dep.to_formula) Requirement.prune + elsif req.satisfied? + Requirement.prune else unsatisfied_reqs[dependent] << req end |
