Merge pull request #5383 from MikeMcQuaid/link-provided-by-macos-consistently
link: prevent :provided_by_macos links everywhere.
This commit is contained in:
commit
d20f0a8a31
@ -78,28 +78,14 @@ module Homebrew
|
||||
if keg_only
|
||||
if Homebrew.default_prefix?
|
||||
f = keg.to_formula
|
||||
caveats = Caveats.new(f)
|
||||
|
||||
if f.keg_only_reason.reason == :provided_by_macos &&
|
||||
(MacOS.version >= :mojave ||
|
||||
MacOS::Xcode.version >= "10.0" ||
|
||||
MacOS::CLT.version >= "10.0")
|
||||
if f.keg_only_reason.reason == :provided_by_macos
|
||||
caveats = Caveats.new(f)
|
||||
opoo <<~EOS
|
||||
Refusing to link macOS-provided software: #{keg.name}
|
||||
#{caveats.keg_only_text(skip_reason: true).strip}
|
||||
EOS
|
||||
next
|
||||
end
|
||||
|
||||
if keg.name.start_with?("openssl", "libressl")
|
||||
opoo <<~EOS
|
||||
Refusing to link: #{keg.name}
|
||||
Linking keg-only #{keg.name} means you may end up linking against the insecure,
|
||||
deprecated system OpenSSL while using the headers from Homebrew's #{keg.name}.
|
||||
#{caveats.keg_only_text(skip_reason: true).strip}
|
||||
EOS
|
||||
next
|
||||
end
|
||||
end
|
||||
|
||||
unless args.force?
|
||||
|
||||
@ -531,7 +531,13 @@ module Homebrew
|
||||
return unless @versioned_formula
|
||||
return unless @core_tap
|
||||
|
||||
return if formula.keg_only? && formula.keg_only_reason.reason == :versioned_formula
|
||||
if formula.keg_only?
|
||||
return if formula.keg_only_reason.reason == :versioned_formula
|
||||
if formula.name.start_with?("openssl", "libressl") &&
|
||||
formula.keg_only_reason.reason == :provided_by_macos
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
keg_only_whitelist = %w[
|
||||
autoconf@2.13
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user