diff options
| author | Mike McQuaid | 2016-12-10 17:58:41 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2016-12-10 17:58:41 +0000 |
| commit | f7f15673a8e8ecb6817435c7bd51c7e8077220e4 (patch) | |
| tree | cf5d9680ed0e973645a81ba4bcee2d27263efd3b /Library | |
| parent | a566540c46563b1ea84158c963134862167ca993 (diff) | |
| download | brew-f7f15673a8e8ecb6817435c7bd51c7e8077220e4.tar.bz2 | |
Fix dependency option handling.
- formula_installer: only recompute dependencies when necessary i.e.
when a bottle pour fails.
- formula_installer: re-add accidentally remove dependency options
- dependency: missing options are only those that actually exist on a
formula
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/dependency.rb | 8 | ||||
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 11 |
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 1eae668a4..3b1bfe182 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) |
