aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/cpptest.rb
diff options
context:
space:
mode:
authorJack Nagel2013-01-23 00:26:26 -0600
committerJack Nagel2013-01-26 12:14:46 -0600
commitf97b4a95090e76e0235d279d458966e1edb69bfa (patch)
treef0fe016a7d185888b5af7a8531d12326cd9a04b7 /Library/Formula/cpptest.rb
parent5b9909d4f5747a9c929bdc34c93dbbe9e49a9c38 (diff)
downloadhomebrew-f97b4a95090e76e0235d279d458966e1edb69bfa.tar.bz2
Dependency.expand_dependencies
Move Formula.expand_dependencies into the Dependency class, and extend it to allow arbitrary filters to be applied when enumerating deps. When supplied with a block, expand_dependencies will yield a [dependent, dependency] pair for each dependency, allowing callers to filter out dependencies that may not be applicable or useful in a given situation. Deps can be skipped by simple calling Dependency.prune in the block, e.g.: Dependency.expand_dependencies do |f, dep| Dependency.prune if dep.to_formula.installed? end The return value of the method is the filtered list. If no block is supplied, a default filter that omits optional or recommended deps based on what the dependent formula has requested is applied. Formula#recursive_dependencies is now implemented on top of this, allowing FormulaInstaller to exact detailed control over what deps are installed. `brew missing` and `brew upgrade` can learn to use this to apply the installed options set when expanding dependencies. Move Formula.expand_deps and Formula#recursive_deps into compat, because these methods do not respect the new optional and recommended tags and thus should no longer be used.
Diffstat (limited to 'Library/Formula/cpptest.rb')
0 files changed, 0 insertions, 0 deletions