Elide prefix "/usr/local" in bottle block
brew test-bot --ci-upload is run on a Linux machine. The macOS bottles have a prefix of "/usr/local". The default prefix on Linux is /home/linuxbrew/.linuxbrew. Elide prefix "/usr/local" in the bottle block, even it does not match the default prefix. Ditto for cellar.
This commit is contained in:
parent
7695ba3048
commit
3c4f9c746e
@ -44,12 +44,12 @@ BOTTLE_ERB = <<-EOS.freeze
|
|||||||
<% if !root_url.start_with?(HOMEBREW_BOTTLE_DEFAULT_DOMAIN) %>
|
<% if !root_url.start_with?(HOMEBREW_BOTTLE_DEFAULT_DOMAIN) %>
|
||||||
root_url "<%= root_url %>"
|
root_url "<%= root_url %>"
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if prefix != BottleSpecification::DEFAULT_PREFIX %>
|
<% if ![Homebrew::DEFAULT_PREFIX, "/usr/local"].include?(prefix) %>
|
||||||
prefix "<%= prefix %>"
|
prefix "<%= prefix %>"
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if cellar.is_a? Symbol %>
|
<% if cellar.is_a? Symbol %>
|
||||||
cellar :<%= cellar %>
|
cellar :<%= cellar %>
|
||||||
<% elsif cellar != BottleSpecification::DEFAULT_CELLAR %>
|
<% elsif ![Homebrew::DEFAULT_CELLAR, "/usr/local/Cellar"].include?(cellar) %>
|
||||||
cellar "<%= cellar %>"
|
cellar "<%= cellar %>"
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if rebuild.positive? %>
|
<% if rebuild.positive? %>
|
||||||
|
@ -49,6 +49,8 @@ module Homebrew
|
|||||||
extend FileUtils
|
extend FileUtils
|
||||||
|
|
||||||
DEFAULT_PREFIX ||= "/usr/local".freeze
|
DEFAULT_PREFIX ||= "/usr/local".freeze
|
||||||
|
DEFAULT_CELLAR = "#{DEFAULT_PREFIX}/Cellar".freeze
|
||||||
|
DEFAULT_REPOSITORY = "#{DEFAULT_PREFIX}/Homebrew".freeze
|
||||||
|
|
||||||
class << self
|
class << self
|
||||||
attr_writer :failed, :raise_deprecation_exceptions, :auditing, :args
|
attr_writer :failed, :raise_deprecation_exceptions, :auditing, :args
|
||||||
|
@ -327,7 +327,6 @@ end
|
|||||||
|
|
||||||
class BottleSpecification
|
class BottleSpecification
|
||||||
DEFAULT_PREFIX = Homebrew::DEFAULT_PREFIX
|
DEFAULT_PREFIX = Homebrew::DEFAULT_PREFIX
|
||||||
DEFAULT_CELLAR = "#{DEFAULT_PREFIX}/Cellar".freeze
|
|
||||||
|
|
||||||
attr_rw :prefix, :cellar, :rebuild
|
attr_rw :prefix, :cellar, :rebuild
|
||||||
attr_accessor :tap
|
attr_accessor :tap
|
||||||
@ -335,8 +334,8 @@ class BottleSpecification
|
|||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
@rebuild = 0
|
@rebuild = 0
|
||||||
@prefix = DEFAULT_PREFIX
|
@prefix = Homebrew::DEFAULT_PREFIX
|
||||||
@cellar = DEFAULT_CELLAR
|
@cellar = Homebrew::DEFAULT_CELLAR
|
||||||
@collector = Utils::Bottles::Collector.new
|
@collector = Utils::Bottles::Collector.new
|
||||||
@root_url_specs = {}
|
@root_url_specs = {}
|
||||||
end
|
end
|
||||||
|
@ -113,8 +113,8 @@ class SystemConfig
|
|||||||
end
|
end
|
||||||
defaults_hash = {
|
defaults_hash = {
|
||||||
HOMEBREW_PREFIX: Homebrew::DEFAULT_PREFIX,
|
HOMEBREW_PREFIX: Homebrew::DEFAULT_PREFIX,
|
||||||
HOMEBREW_REPOSITORY: "#{Homebrew::DEFAULT_PREFIX}/Homebrew",
|
HOMEBREW_REPOSITORY: Homebrew::DEFAULT_REPOSITORY,
|
||||||
HOMEBREW_CELLAR: "#{Homebrew::DEFAULT_PREFIX}/Cellar",
|
HOMEBREW_CELLAR: Homebrew::DEFAULT_CELLAR,
|
||||||
HOMEBREW_CACHE: "#{ENV["HOME"]}/Library/Caches/Homebrew",
|
HOMEBREW_CACHE: "#{ENV["HOME"]}/Library/Caches/Homebrew",
|
||||||
HOMEBREW_RUBY_WARNINGS: "-W0",
|
HOMEBREW_RUBY_WARNINGS: "-W0",
|
||||||
HOMEBREW_TEMP: ENV["HOMEBREW_SYSTEM_TEMP"],
|
HOMEBREW_TEMP: ENV["HOMEBREW_SYSTEM_TEMP"],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user