diff options
| author | Jack Nagel | 2014-08-24 14:46:34 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-08-24 14:46:34 -0500 |
| commit | 8aabba670fb4c561289a8aac90d817f5029ba361 (patch) | |
| tree | aa0e9e7d2c2afafc72a21ad24149e42af3de2b80 /Library/Homebrew/build.rb | |
| parent | b0c1e5f7d6456ea3b350d13383f9fbc72f410c20 (diff) | |
| download | brew-8aabba670fb4c561289a8aac90d817f5029ba361.tar.bz2 | |
Consider on-disk state when computing dependencies
Fixes Homebrew/homebrew#28754.
Fixes Homebrew/homebrew#29846.
Fixes Homebrew/homebrew#30920.
Diffstat (limited to 'Library/Homebrew/build.rb')
| -rw-r--r-- | Library/Homebrew/build.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Library/Homebrew/build.rb b/Library/Homebrew/build.rb index d3adf80de..a24c968f1 100644 --- a/Library/Homebrew/build.rb +++ b/Library/Homebrew/build.rb @@ -79,9 +79,16 @@ class Build end end + def effective_build_options_for(dependent) + args = dependent.build.used_options + args |= Tab.for_formula(dependent).used_options + BuildOptions.new(args, dependent.options) + end + def expand_reqs f.recursive_requirements do |dependent, req| - if (req.optional? || req.recommended?) && dependent.build.without?(req) + build = effective_build_options_for(dependent) + if (req.optional? || req.recommended?) && build.without?(req) Requirement.prune elsif req.build? && dependent != f Requirement.prune @@ -94,7 +101,8 @@ class Build def expand_deps f.recursive_dependencies do |dependent, dep| - if (dep.optional? || dep.recommended?) && dependent.build.without?(dep) + build = effective_build_options_for(dependent) + if (dep.optional? || dep.recommended?) && build.without?(dep) Dependency.prune elsif dep.build? && dependent != f Dependency.prune |
