diff options
| author | Mike McQuaid | 2018-01-14 13:27:43 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2018-01-14 13:27:43 +0000 |
| commit | b70b5429d09d13526ccc08c67fd6a6373b471409 (patch) | |
| tree | f8fea6c707140cb62b0a9936db1e506431c8b46e /Library/Homebrew/formula_installer.rb | |
| parent | b66010605dfb8ecd7e5eb9eb5d1b97462c259e4d (diff) | |
| download | brew-b70b5429d09d13526ccc08c67fd6a6373b471409.tar.bz2 | |
Deprecate default_formula Requirement DSL
This has been a nightmare in terms of the complexity to our dependency
system and the whack-a-mole required on bugs. If a Requirement resolves
to a Formula it should just use `depends_on "formula"` instead. This
matches the effective behaviour all users of bottles (the vast majority
of users and installs) and what we're doing in Homebrew/homebrew-core.
Diffstat (limited to 'Library/Homebrew/formula_installer.rb')
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 48109310e..6d4fb07bd 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -415,16 +415,6 @@ class FormulaInstaller raise UnsatisfiedRequirements, fatals end - def install_requirement_formula?(req_dependency, req, dependent, install_bottle_for_dependent) - return false unless req_dependency - return false if req.build? && dependent.installed? - return true unless req.satisfied? - return false if req.run? - return true if build_bottle? - return true if req.satisfied_by_formula? - install_bottle_for_dependent - end - def runtime_requirements(formula) runtime_deps = formula.runtime_dependencies.map(&:to_formula) recursive_requirements = formula.recursive_requirements do |dependent, _| @@ -443,17 +433,9 @@ class FormulaInstaller f.recursive_requirements do |dependent, req| build = effective_build_options_for(dependent) install_bottle_for_dependent = install_bottle_for?(dependent, build) - use_default_formula = install_bottle_for_dependent || build_bottle? - req_dependency = req.to_dependency(use_default_formula: use_default_formula) if (req.optional? || req.recommended?) && build.without?(req) Requirement.prune - elsif req.build? && use_default_formula && req_dependency&.installed? - Requirement.prune - elsif install_requirement_formula?(req_dependency, req, dependent, install_bottle_for_dependent) - deps.unshift(req_dependency) - formulae.unshift(req_dependency.to_formula) - Requirement.prune elsif req.satisfied? Requirement.prune elsif !runtime_requirements.include?(req) && install_bottle_for_dependent |
