update-report: reset version_scheme only for runtime dependents

`recursive_dependencies` includes build and test dependencies as well,
which means that we're doing this for too many formulae.
This commit is contained in:
Carlo Cabrera 2022-08-06 20:56:53 +08:00
parent 336335abe5
commit ddc23eb268
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0

View File

@ -298,7 +298,14 @@ module Homebrew
Formula.installed.each do |formula|
next unless formula.tap&.core_tap?
next unless formula.recursive_dependencies.map(&:name).include? "gcc"
recursive_runtime_dependencies = Dependency.expand(
formula,
cache_key: "update-report",
) do |_, dependency|
Dependency.prune if dependency.build? || dependency.test?
end
next unless recursive_runtime_dependencies.map(&:name).include? "gcc"
keg = formula.installed_kegs.last
tab = Tab.for_keg(keg)