diff options
| author | Jack Nagel | 2014-03-13 19:10:49 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-03-13 19:25:59 -0500 |
| commit | f36e676bc9e93c4c10d14b3e10e9e2f72bfb25db (patch) | |
| tree | 05517a0df3e7f22b12943f5ce322fb2e08c266b0 /Library | |
| parent | 25164350d626a001599089b9ed2780a78548ae81 (diff) | |
| download | brew-f36e676bc9e93c4c10d14b3e10e9e2f72bfb25db.tar.bz2 | |
Don't ignore dependencies when actually building a dependency
Since the primary FormulaInstaller instance handles the entire
dependency tree, we set ignore_deps to true when instantiated the class
for each dependency in over to avoid repeated work.
However, now that arguments for the build process are whitelisted
instead of blacklisted, we have begun adding "--ignore-dependencies" if
ignore_deps is true.
This isn't quite right when we are installing a dependency. We want to
skip the calculation and installation of *its* dependencies, since the
primary installer takes care of that, but we still want to consider them
in the build process, so that they are available in the build
environment.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 38ecf30bf..8bca9d92a 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -335,16 +335,28 @@ class FormulaInstaller @show_header = true unless deps.empty? end + class DependencyInstaller < FormulaInstaller + def initialize ff + super + @ignore_deps = true + end + + def sanitized_ARGV_options + args = super + args.delete "--ignore-dependencies" + args + end + end + def install_dependency(dep, inherited_options) df = dep.to_formula outdated_keg = Keg.new(df.linked_keg.realpath) rescue nil - fi = FormulaInstaller.new(df) + fi = DependencyInstaller.new(df) fi.options |= Tab.for_formula(df).used_options fi.options |= dep.options fi.options |= inherited_options - fi.ignore_deps = true fi.build_from_source = build_from_source? fi.verbose = verbose? unless verbose == :quieter fi.debug = debug? |
