Merge pull request #6591 from amyspark/fix-depth-upgrade-check
upgrade: reject formulae checked in earlier levels
This commit is contained in:
commit
f1702e5139
@ -255,7 +255,7 @@ module Homebrew
|
||||
[formulae_to_upgrade, formulae_pinned]
|
||||
end
|
||||
|
||||
def broken_dependents(kegs, formulae)
|
||||
def broken_dependents(kegs, formulae, scanned = Set.new)
|
||||
formulae_to_reinstall = Set.new
|
||||
formulae_pinned_and_outdated = Set.new
|
||||
|
||||
@ -264,8 +264,9 @@ module Homebrew
|
||||
descendants = Set.new
|
||||
|
||||
dependents = kegs.select do |keg|
|
||||
keg.runtime_dependencies
|
||||
keg = keg.runtime_dependencies
|
||||
.any? { |d| d["full_name"] == formula.full_name }
|
||||
keg unless scanned.include?(keg)
|
||||
end
|
||||
|
||||
next if dependents.empty?
|
||||
@ -290,7 +291,9 @@ module Homebrew
|
||||
descendants << f
|
||||
end
|
||||
|
||||
descendants_to_reinstall, descendants_pinned = broken_dependents(kegs, descendants)
|
||||
scanned.merge dependents
|
||||
|
||||
descendants_to_reinstall, descendants_pinned = broken_dependents(kegs, descendants, scanned)
|
||||
|
||||
formulae_to_reinstall.merge descendants_to_reinstall
|
||||
formulae_pinned_and_outdated.merge descendants_pinned
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user