formula_installer: fix test dependencies.

Only prune test dependencies from the tree when they aren't also build
dependencies (and vice-versa with build dependencies) and the include
test argument hasn't been passed.
This commit is contained in:
Mike McQuaid 2020-05-19 09:34:50 +01:00
parent e254e804ee
commit 2fc643421f
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -488,9 +488,9 @@ class FormulaInstaller
if dep.prune_from_option?(build)
Dependency.prune
elsif include_test? && dep.test? && !dep.installed?
Dependency.keep_but_prune_recursive_deps
elsif dep.build? && install_bottle_for?(dependent, build)
elsif dep.test? && !dep.build? && !include_test?
Dependency.prune
elsif dep.build? && !dep.test? && install_bottle_for?(dependent, build)
Dependency.prune
elsif dep.prune_if_build_and_not_dependent?(dependent)
Dependency.prune