aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorMike McQuaid2016-12-10 18:20:59 +0000
committerGitHub2016-12-10 18:20:59 +0000
commit7258557aea4b6a9c6833efe0fc09c6a2145f54f7 (patch)
tree46ae6968d7269b90422a03c729e99f1e788176a4 /Library/Homebrew
parent51c31f4d515567b66333a031d8c8c62c7239ddba (diff)
parentf7f15673a8e8ecb6817435c7bd51c7e8077220e4 (diff)
downloadbrew-7258557aea4b6a9c6833efe0fc09c6a2145f54f7.tar.bz2
Merge pull request #1647 from MikeMcQuaid/fix-dependency-option-handling
Fix dependency option handling.
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/dependency.rb8
-rw-r--r--Library/Homebrew/formula_installer.rb11
2 files changed, 11 insertions, 8 deletions
diff --git a/Library/Homebrew/dependency.rb b/Library/Homebrew/dependency.rb
index 6b60654e1..253ba4bee 100644
--- a/Library/Homebrew/dependency.rb
+++ b/Library/Homebrew/dependency.rb
@@ -43,8 +43,12 @@ class Dependency
end
def missing_options(inherited_options)
- required = options | inherited_options
- required - Tab.for_formula(to_formula).used_options
+ formula = to_formula
+ required = options
+ required |= inherited_options
+ required &= formula.options.to_a
+ required -= Tab.for_formula(formula).used_options
+ required
end
def modify_build_environment
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index 2f00a824f..65607d88a 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -236,8 +236,7 @@ class FormulaInstaller
@@attempted << formula
- pour_bottle = pour_bottle?(warn: true)
- if pour_bottle
+ if pour_bottle?(warn: true)
begin
pour
rescue Exception => e
@@ -251,18 +250,17 @@ class FormulaInstaller
onoe e.message
opoo "Bottle installation failed: building from source."
raise BuildToolsError, [formula] unless DevelopmentTools.installed?
+ compute_and_install_dependencies unless skip_deps_check?
else
- puts_requirement_messages
@poured_bottle = true
end
end
+ puts_requirement_messages
+
build_bottle_preinstall if build_bottle?
unless @poured_bottle
- not_pouring = !pour_bottle || @pour_failed
- compute_and_install_dependencies if not_pouring && !ignore_deps?
- puts_requirement_messages
build
clean
@@ -467,6 +465,7 @@ class FormulaInstaller
fi = DependencyInstaller.new(df)
fi.options |= tab.used_options
+ fi.options |= Tab.remap_deprecated_options(df.deprecated_options, dep.options)
fi.options |= inherited_options
fi.options &= df.options
fi.build_from_source = ARGV.build_formula_from_source?(df)