parent
a72ea8baa0
commit
efb200e825
@ -213,9 +213,15 @@ module Homebrew
|
||||
formulae_to_upgrade = Set.new
|
||||
formulae_pinned = Set.new
|
||||
|
||||
formulae.each do |formula|
|
||||
formulae_to_check = formulae
|
||||
checked_formulae = Set.new
|
||||
|
||||
until formulae_to_check.empty?
|
||||
descendants = Set.new
|
||||
|
||||
formulae_to_check.each do |formula|
|
||||
next if checked_formulae.include?(formula)
|
||||
|
||||
dependents = kegs.select do |keg|
|
||||
keg.runtime_dependencies
|
||||
.any? { |d| d["full_name"] == formula.full_name }
|
||||
@ -228,7 +234,6 @@ module Homebrew
|
||||
dependent_formulae.each do |f|
|
||||
next if formulae_to_upgrade.include?(f)
|
||||
next if formulae_pinned.include?(f)
|
||||
|
||||
if f.outdated?(fetch_head: args.fetch_HEAD?)
|
||||
if f.pinned?
|
||||
formulae_pinned << f
|
||||
@ -240,10 +245,10 @@ module Homebrew
|
||||
descendants << f
|
||||
end
|
||||
|
||||
upgradable_descendants, pinned_descendants = upgradable_dependents(kegs, descendants)
|
||||
checked_formulae << formula
|
||||
end
|
||||
|
||||
formulae_to_upgrade.merge upgradable_descendants
|
||||
formulae_pinned.merge pinned_descendants
|
||||
formulae_to_check = descendants
|
||||
end
|
||||
|
||||
[formulae_to_upgrade, formulae_pinned]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user