aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/keg.rb
diff options
context:
space:
mode:
authorAlyssa Ross2016-12-30 20:34:14 +0000
committerAlyssa Ross2016-12-30 20:34:14 +0000
commitd998a3fcce579b087dee76c5aeb9956713e81b62 (patch)
treeb97e59ca50c70c69008d3fdc36b5aaa4c79751f0 /Library/Homebrew/keg.rb
parent4322c1c562d2c5695a43e96e88db44e57083cf50 (diff)
downloadbrew-d998a3fcce579b087dee76c5aeb9956713e81b62.tar.bz2
tab: remove #reliable_runtime_dependencies?
See https://github.com/Homebrew/brew/pull/1750#discussion_r94243825 for discussion. Removes Tab#reliable_runtime_dependencies? in favour of returning nil from Tab#runtime_dependencies if the list is unreliable. Because Homebrew 1.1.6 hasn't been tagged yet, tabs created in tests aren't created with a homebrew_version that marks the runtime_dependencies in the Tab as reliable, so there are some tests that fail. To work around this, I've had to add a line to some tests that explicitly overrides the homebrew_version in the Tab. This is really ugly though, so they should be removed as soon as possible after 1.1.6 is released.
Diffstat (limited to 'Library/Homebrew/keg.rb')
-rw-r--r--Library/Homebrew/keg.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb
index 65ae3478c..4a02dc8e0 100644
--- a/Library/Homebrew/keg.rb
+++ b/Library/Homebrew/keg.rb
@@ -104,10 +104,8 @@ class Keg
# so need them to be calculated now.
#
# This happens after the initial dependency check because it's sloooow.
- remaining_formulae = Formula.installed.reject do |f|
- f.installed_kegs.all? do |k|
- Tab.for_keg(k).reliable_runtime_dependencies?
- end
+ remaining_formulae = Formula.installed.select do |f|
+ f.installed_kegs.any? { |k| Tab.for_keg(k).runtime_dependencies.nil? }
end
keg_names = kegs.map(&:name)
@@ -362,7 +360,7 @@ class Keg
tap = Tab.for_keg(self).source["tap"]
Keg.all.select do |keg|
tab = Tab.for_keg(keg)
- next unless tab.reliable_runtime_dependencies?
+ next if tab.runtime_dependencies.nil?
tab.runtime_dependencies.any? do |dep|
# Resolve formula rather than directly comparing names
# in case of conflicts between formulae from different taps.