aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McQuaid2017-03-15 19:29:16 +0100
committerMike McQuaid2017-03-15 19:29:16 +0100
commit60f96df44dc9d3145d605cddee1d27b1980ae14a (patch)
tree02033da7310b9d1410c0365022c068ba2c79d7ef
parent7685618a1c110e5430a29c75f44fd3d4aee006e8 (diff)
downloadbrew-60f96df44dc9d3145d605cddee1d27b1980ae14a.tar.bz2
formula_installer: need up to date req formulae.
This makes them behave consistently to other dependencies. Otherwise other checks for them being `installed?` will fail. Fixes #2333 Closes #2302 Fixes https://github.com/Homebrew/homebrew-science/issues/5247
-rw-r--r--Library/Homebrew/formula_installer.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index 1f91ad5c4..fa46a30f4 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -410,10 +410,13 @@ class FormulaInstaller
end
def install_requirement_formula?(req, dependent, build)
- return false unless req.to_dependency
+ req_dependency = req.to_dependency
+ return false unless req_dependency
return true unless req.satisfied?
return false if req.run?
- install_bottle_for?(dependent, build) || build_bottle?
+ return true if build_bottle?
+ return true unless req_dependency.installed?
+ install_bottle_for?(dependent, build)
end
def expand_requirements