aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/uninstall.rb
diff options
context:
space:
mode:
authorAlyssa Ross2016-10-25 23:48:00 +0100
committerAlyssa Ross2016-10-25 23:48:00 +0100
commitd0ad09708218bfbffed4857387b259bceba177c2 (patch)
tree5eac918bf2392f97c5902ed43aab96f98ab27373 /Library/Homebrew/cmd/uninstall.rb
parentaff5f42c58f735a90f50f4992ce037e4de413f8c (diff)
downloadbrew-d0ad09708218bfbffed4857387b259bceba177c2.tar.bz2
uninstall: remove duplicated method
This was moved to Keg, but looks like I forgot to get rid of it here.
Diffstat (limited to 'Library/Homebrew/cmd/uninstall.rb')
-rw-r--r--Library/Homebrew/cmd/uninstall.rb33
1 files changed, 0 insertions, 33 deletions
diff --git a/Library/Homebrew/cmd/uninstall.rb b/Library/Homebrew/cmd/uninstall.rb
index 2c7be04be..e13ca8385 100644
--- a/Library/Homebrew/cmd/uninstall.rb
+++ b/Library/Homebrew/cmd/uninstall.rb
@@ -92,39 +92,6 @@ module Homebrew
true
end
- # Will return some kegs, and some dependencies, if they're present.
- # For efficiency, we don't bother trying to get complete data.
- def find_some_installed_dependents(kegs)
- kegs.each do |keg|
- dependents = keg.installed_dependents - kegs
- dependents.map! { |d| "#{d.name} #{d.version}" }
- return [keg], dependents if dependents.any?
- end
-
- # Find formulae that didn't have dependencies saved in all of their kegs,
- # so need them to be calculated now.
- #
- # This happens after the initial dependency check because it's sloooow.
- remaining_formulae = Formula.installed.select { |f|
- f.installed_kegs.any? { |k| Tab.for_keg(k).runtime_dependencies.nil? }
- }
-
- keg_names = kegs.map(&:name)
- kegs_by_name = kegs.group_by(&:to_formula)
- remaining_formulae.each do |dependent|
- required = dependent.missing_dependencies(hide: keg_names)
- required.select! do |f|
- kegs_by_name.key?(f)
- end
- next unless required.any?
-
- required_kegs = required.map { |f| kegs_by_name[f].sort_by(&:version).last }
- return required_kegs, [dependent]
- end
-
- nil
- end
-
def rm_pin(rack)
Formulary.from_rack(rack).unpin
rescue