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 keg_only
|
||||||
if Homebrew.default_prefix?
|
if Homebrew.default_prefix?
|
||||||
f = keg.to_formula
|
f = keg.to_formula
|
||||||
caveats = Caveats.new(f)
|
if f.keg_only_reason.reason == :provided_by_macos
|
||||||
|
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")
|
|
||||||
opoo <<~EOS
|
opoo <<~EOS
|
||||||
Refusing to link macOS-provided software: #{keg.name}
|
Refusing to link macOS-provided software: #{keg.name}
|
||||||
#{caveats.keg_only_text(skip_reason: true).strip}
|
#{caveats.keg_only_text(skip_reason: true).strip}
|
||||||
EOS
|
EOS
|
||||||
next
|
next
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
unless args.force?
|
unless args.force?
|
||||||
|
|||||||
@ -531,7 +531,13 @@ module Homebrew
|
|||||||
return unless @versioned_formula
|
return unless @versioned_formula
|
||||||
return unless @core_tap
|
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[
|
keg_only_whitelist = %w[
|
||||||
autoconf@2.13
|
autoconf@2.13
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user