aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-12-09 14:36:10 -0600
committerJack Nagel2013-12-09 14:36:10 -0600
commitbe5f9545dd7611d92b58506cb3878c295b8f2c7e (patch)
treed5a0314af73dfc4baa261035d55fc248e0bc89e2 /Library
parent0b9c29a66743cf2b0fd2128ba83b2bc8e7ad9e4c (diff)
downloadbrew-be5f9545dd7611d92b58506cb3878c295b8f2c7e.tar.bz2
Move dependency expansion logic up one level
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula_installer.rb25
1 files changed, 13 insertions, 12 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index acfa77973..2cb420186 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -171,7 +171,14 @@ class FormulaInstaller
def compute_and_install_dependencies
perform_readline_hack
check_requirements
- install_dependencies
+
+ unsatisfied_deps.concat(requirement_deps)
+ unsatisfied_deps.concat(filter_deps)
+
+ install_dependencies(unsatisfied_deps)
+ ensure
+ requirement_deps.clear
+ unsatisfied_deps.clear
end
def check_requirements
@@ -234,25 +241,19 @@ class FormulaInstaller
f.recursive_dependencies.select { |d| deps.include? d }
end
- def install_dependencies
- unsatisfied_deps.concat(requirement_deps)
- unsatisfied_deps.concat(filter_deps)
-
- if unsatisfied_deps.length > 1
- oh1 "Installing dependencies for #{f}: #{Tty.green}#{unsatisfied_deps*", "}#{Tty.reset}"
+ def install_dependencies(deps)
+ if deps.length > 1
+ oh1 "Installing dependencies for #{f}: #{Tty.green}#{deps*", "}#{Tty.reset}"
end
- unsatisfied_deps.each do |dep|
+ deps.each do |dep|
if dep.requested?
install_dependency(dep)
else
ARGV.filter_for_dependencies { install_dependency(dep) }
end
end
- @show_header = true unless unsatisfied_deps.empty?
- ensure
- requirement_deps.clear
- unsatisfied_deps.clear
+ @show_header = true unless deps.empty?
end
def install_dependency dep