aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorilovezfs2017-07-27 08:34:12 -0700
committerilovezfs2017-07-27 08:34:12 -0700
commitdeac8f14bb5b7837c3528d07cb19394b106ef7e5 (patch)
treee96108afc935095641681e6bd62542b92fba3fb9 /Library
parent97b757bc9638c837f565958730a23211552e5540 (diff)
downloadbrew-deac8f14bb5b7837c3528d07cb19394b106ef7e5.tar.bz2
formula_installer: allow version mismatched build deps
Only check runtime dependencies for version conflicts to avoid having to create unnecessary duplicate formulae. For example, a formula that needs to be built with ghc@8.0 should still be allowed to have a build-time dependency on a cabal-install that was itself built with ghc@8.2.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula_installer.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index 27786e77e..a0c091e7f 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -151,6 +151,8 @@ class FormulaInstaller
recursive_deps = formula.recursive_dependencies
recursive_formulae = recursive_deps.map(&:to_formula)
+ recursive_runtime_deps = formula.recursive_dependencies.reject(&:build?)
+ recursive_runtime_formulae = recursive_runtime_deps.map(&:to_formula)
recursive_dependencies = []
recursive_formulae.each do |dep|
@@ -176,7 +178,7 @@ class FormulaInstaller
version_hash = {}
version_conflicts = Set.new
- recursive_formulae.each do |f|
+ recursive_runtime_formulae.each do |f|
name = f.name
unversioned_name, = name.split("@")
version_hash[unversioned_name] ||= Set.new