aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorTodd Persen2013-11-14 15:25:56 -0500
committerJack Nagel2013-11-15 09:36:01 -0600
commit8c6c4185b77291d559604905bf950673c4ba063c (patch)
tree75301694a022e7cce89fe5c69688d0bd9a4884b7 /Library
parentba0cfd3582702aa957edf37338c4e8f3391c65bf (diff)
downloadbrew-8c6c4185b77291d559604905bf950673c4ba063c.tar.bz2
Ensure build-time deps are installed when bottle installation fails
Fixes Homebrew/homebrew#22245. Closes Homebrew/homebrew#24324. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula_installer.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index 7a59338bf..156e1737f 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -32,6 +32,7 @@ class FormulaInstaller
end
def pour_bottle? install_bottle_options={:warn=>false}
+ return false if @pour_failed
tab.used_options.empty? && options.empty? && \
install_bottle?(f, install_bottle_options)
end
@@ -131,12 +132,14 @@ class FormulaInstaller
end
rescue
raise if ARGV.homebrew_developer?
+ @pour_failed = true
opoo "Bottle installation failed: building from source."
end
build_bottle_preinstall if ARGV.build_bottle?
unless @poured_bottle
+ install_dependencies if @pour_failed && !ignore_deps
build
clean
end
@@ -236,6 +239,8 @@ class FormulaInstaller
end
def install_dependencies
+ @effective_deps = nil if @pour_failed
+
if effective_deps.length > 1
oh1 "Installing dependencies for #{f}: #{Tty.green}#{effective_deps*", "}#{Tty.reset}"
end