Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not build from source on ARM unless explicitly requested #9518

Merged
merged 2 commits into from Dec 16, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions Library/Homebrew/formula_installer.rb
Expand Up @@ -231,6 +231,23 @@ def check_install_sanity
raise CannotInstallFormulaError, "--force-bottle passed but #{formula.full_name} has no bottle!"
end

if Homebrew.default_prefix? && !Homebrew::EnvConfig.developer? &&
!build_from_source? && !build_bottle? &&
formula.tap&.core_tap? && !formula.bottle_unneeded? &&
# Integration tests override homebrew-core locations
ENV["HOMEBREW_TEST_TMPDIR"].nil? &&
!pour_bottle?
raise CannotInstallFormulaError, <<~EOS
#{formula}: no bottle available!
You can try to install from source with e.g.
brew install --build-from-source #{formula}
Please note building from source is unsupported. You will encounter build
failures with some formulae. If you experience any issues please create pull
requests instead of asking for help on Homebrew's GitHub, Twitter or any other
official channels.
EOS
end

type, reason = DeprecateDisable.deprecate_disable_info formula

if type.present?
Expand Down