Remove last use of deprecated Formula#recursive_deps

Fixes Homebrew/homebrew#19107.
This commit is contained in:
Jack Nagel 2013-04-10 11:52:54 -05:00
parent bd4aaac96b
commit 136aa4c6f4
3 changed files with 2 additions and 17 deletions

View File

@ -19,7 +19,7 @@ module Homebrew extend self
puts "'v8'.f # => instance of the Ack formula" puts "'v8'.f # => instance of the Ack formula"
puts ":hub.f.installed?" puts ":hub.f.installed?"
puts ":lua.f.methods - 1.methods" puts ":lua.f.methods - 1.methods"
puts ":mpd.f.recursive_deps.reject{|f| f.installed? }" puts ":mpd.f.recursive_dependencies.reject(&:installed?)"
else else
ohai "Interactive Homebrew Shell" ohai "Interactive Homebrew Shell"
puts "Example commands available with: brew irb --help" puts "Example commands available with: brew irb --help"

View File

@ -100,21 +100,6 @@ class Formula
end end
end end
# These methods return lists of Formula objects.
# They are eprecated in favor of Dependency::expand_dependencies
# and Formula#recursive_dependencies, which return lists of
# Dependency objects instead.
def self.expand_deps f
f.deps.map do |dep|
f_dep = Formula.factory dep.to_s
expand_deps(f_dep) << f_dep
end
end
def recursive_deps
Formula.expand_deps(self).flatten.uniq
end
def self.all def self.all
opoo "Formula.all is deprecated, use Formula.map instead" opoo "Formula.all is deprecated, use Formula.map instead"
map map

View File

@ -81,7 +81,7 @@ class FormulaInstaller
unless ignore_deps unless ignore_deps
# HACK: If readline is present in the dependency tree, it will clash # HACK: If readline is present in the dependency tree, it will clash
# with the stdlib's Readline module when the debugger is loaded # with the stdlib's Readline module when the debugger is loaded
if f.recursive_deps.any? { |d| d.name == "readline" } and ARGV.debug? if f.recursive_dependencies.any? { |d| d.name == "readline" } and ARGV.debug?
ENV['HOMEBREW_NO_READLINE'] = '1' ENV['HOMEBREW_NO_READLINE'] = '1'
end end