Fix expansion of deps with --build-bottle

This commit is contained in:
Jack Nagel 2013-07-26 15:05:37 -05:00
parent 023aff10c7
commit 613546a994

View File

@ -169,13 +169,19 @@ class FormulaInstaller
# All dependencies that we must install before installing f. # All dependencies that we must install before installing f.
# These do not honor flags like --HEAD and --devel. # These do not honor flags like --HEAD and --devel.
def necessary_deps def necessary_deps
# FIXME: can't check this inside the block for the top-level dependent
# because it depends on the contents of ARGV.
pour_bottle = pour_bottle?
ARGV.filter_for_dependencies do ARGV.filter_for_dependencies do
f.recursive_dependencies do |dependent, dep| f.recursive_dependencies do |dependent, dep|
dep.universal! if f.build.universal? && !dep.build? dep.universal! if f.build.universal? && !dep.build?
if (dep.optional? || dep.recommended?) && dependent.build.without?(dep.name) if (dep.optional? || dep.recommended?) && dependent.build.without?(dep.name)
Dependency.prune Dependency.prune
elsif dep.build? && install_bottle?(dependent) elsif dep.build? && dependent == f && pour_bottle
Dependency.prune
elsif dep.build? && dependent != f && install_bottle?(dependent)
Dependency.prune Dependency.prune
elsif dep.satisfied? elsif dep.satisfied?
Dependency.skip Dependency.skip