aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dependencies.rb
diff options
context:
space:
mode:
authorJack Nagel2012-08-14 23:13:18 -0500
committerJack Nagel2012-08-14 23:26:50 -0500
commitc38bc4fd677bd5dfaaab418748e1196c13635852 (patch)
tree659a4e4bac0afb0b6da8f8fa874fd60e57b1a31a /Library/Homebrew/dependencies.rb
parent53cf970312fb98d53fa5859bc039e453b60274cc (diff)
downloadbrew-c38bc4fd677bd5dfaaab418748e1196c13635852.tar.bz2
Recursively expand requirements in FormulaInstaller
Currently FormulaInstaller "forgets" about the requirements of dependencies, as dependencies are recursively expanded by the first FormulaInstaller instance, and then ignored by subsequent instances to prevent duplicate installation attempts. These requirements then have their messages displayed, but the fatal check is skipped and thus no exception is raised. Now that we have Formula#recursive_requirements, we can mirror what we are doing with dependencies and recursively expand requirements up front. While at it, fix a bug in determining Requirement equality that resulted in unique requirements being eliminated from a formula's set of recursive requirements. Fixes Homebrew/homebrew#12290. Fixes Homebrew/homebrew#14084. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew/dependencies.rb')
-rw-r--r--Library/Homebrew/dependencies.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/Library/Homebrew/dependencies.rb b/Library/Homebrew/dependencies.rb
index c4b8f0b67..44584242a 100644
--- a/Library/Homebrew/dependencies.rb
+++ b/Library/Homebrew/dependencies.rb
@@ -137,7 +137,7 @@ class Requirement
end
def hash
- @message.hash
+ message.hash
end
end
@@ -194,7 +194,6 @@ end
# This requirement is used to require an X11 implementation,
# optionally with a minimum version number.
class X11Dependency < Requirement
-
def initialize min_version=nil
@min_version = min_version
end
@@ -216,6 +215,9 @@ class X11Dependency < Requirement
ENV.x11
end
+ def hash
+ "X11".hash
+ end
end