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>
This commit is contained in:
parent
ba0cfd3582
commit
8c6c4185b7
@ -32,6 +32,7 @@ class FormulaInstaller
|
|||||||
end
|
end
|
||||||
|
|
||||||
def pour_bottle? install_bottle_options={:warn=>false}
|
def pour_bottle? install_bottle_options={:warn=>false}
|
||||||
|
return false if @pour_failed
|
||||||
tab.used_options.empty? && options.empty? && \
|
tab.used_options.empty? && options.empty? && \
|
||||||
install_bottle?(f, install_bottle_options)
|
install_bottle?(f, install_bottle_options)
|
||||||
end
|
end
|
||||||
@ -131,12 +132,14 @@ class FormulaInstaller
|
|||||||
end
|
end
|
||||||
rescue
|
rescue
|
||||||
raise if ARGV.homebrew_developer?
|
raise if ARGV.homebrew_developer?
|
||||||
|
@pour_failed = true
|
||||||
opoo "Bottle installation failed: building from source."
|
opoo "Bottle installation failed: building from source."
|
||||||
end
|
end
|
||||||
|
|
||||||
build_bottle_preinstall if ARGV.build_bottle?
|
build_bottle_preinstall if ARGV.build_bottle?
|
||||||
|
|
||||||
unless @poured_bottle
|
unless @poured_bottle
|
||||||
|
install_dependencies if @pour_failed && !ignore_deps
|
||||||
build
|
build
|
||||||
clean
|
clean
|
||||||
end
|
end
|
||||||
@ -236,6 +239,8 @@ class FormulaInstaller
|
|||||||
end
|
end
|
||||||
|
|
||||||
def install_dependencies
|
def install_dependencies
|
||||||
|
@effective_deps = nil if @pour_failed
|
||||||
|
|
||||||
if effective_deps.length > 1
|
if effective_deps.length > 1
|
||||||
oh1 "Installing dependencies for #{f}: #{Tty.green}#{effective_deps*", "}#{Tty.reset}"
|
oh1 "Installing dependencies for #{f}: #{Tty.green}#{effective_deps*", "}#{Tty.reset}"
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user