software_spec: deprecate prefix for bottles.

Turns out we weren't actually using/checking this value at all (so I'd
be very surprised if anyone is actually using it).
This commit is contained in:
Mike McQuaid 2020-12-09 12:51:00 +00:00
parent 37fe150284
commit 0f0aa83fa1
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -356,6 +356,15 @@ class BottleSpecification
@root_url_specs = {} @root_url_specs = {}
end end
def prefix=(prefix)
if [HOMEBREW_DEFAULT_PREFIX,
HOMEBREW_MACOS_ARM_DEFAULT_PREFIX,
HOMEBREW_LINUX_DEFAULT_PREFIX].exclude?(prefix)
odeprecated "setting `prefix` for bottles"
end
@prefix = prefix
end
def root_url(var = nil, specs = {}) def root_url(var = nil, specs = {})
if var.nil? if var.nil?
@root_url ||= "#{Homebrew::EnvConfig.bottle_domain}/#{Utils::Bottles::Bintray.repository(tap)}" @root_url ||= "#{Homebrew::EnvConfig.bottle_domain}/#{Utils::Bottles::Bintray.repository(tap)}"