Deprecate, disable, delete code for next major/minor version.

Do the usual dance for bumping our major/minor version.
This commit is contained in:
Mike McQuaid 2021-04-09 09:30:36 +01:00
parent fa3af8d24d
commit d73351251c
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70
44 changed files with 91 additions and 620 deletions

View File

@ -16,8 +16,6 @@ module Cask
:cask, :cask,
:macos, :macos,
:arch, :arch,
:x11,
:java,
]).freeze ]).freeze
VALID_ARCHES = { VALID_ARCHES = {
@ -27,7 +25,7 @@ module Cask
arm64: { type: :arm, bits: 64 }, arm64: { type: :arm, bits: 64 },
}.freeze }.freeze
attr_reader :arch, :cask, :formula, :java, :macos, :x11 attr_reader :arch, :cask, :formula, :macos
def initialize def initialize
super({}) super({})
@ -81,20 +79,6 @@ module Cask
@arch.concat(arches.map { |arch| VALID_ARCHES[arch] }) @arch.concat(arches.map { |arch| VALID_ARCHES[arch] })
end end
def java=(arg)
odisabled "depends_on :java", "depends_on a specific Java formula"
@java = arg
end
def x11=(arg)
raise "invalid 'depends_on x11' value: #{arg.inspect}" unless [true, false].include?(arg)
odisabled "depends_on :x11", "depends_on specific X11 formula(e)"
@x11 = arg
end
end end
end end
end end

View File

@ -260,7 +260,6 @@ timeout: timeout)
macos_dependencies macos_dependencies
arch_dependencies arch_dependencies
x11_dependencies
cask_and_formula_dependencies cask_and_formula_dependencies
end end
@ -286,11 +285,6 @@ timeout: timeout)
"but you are running #{@current_arch}." "but you are running #{@current_arch}."
end end
def x11_dependencies
return unless @cask.depends_on.x11
raise CaskX11DependencyError, @cask.token unless MacOS::XQuartz.installed?
end
def graph_dependencies(cask_or_formula, acc = TopologicalHash.new) def graph_dependencies(cask_or_formula, acc = TopologicalHash.new)
return acc if acc.key?(cask_or_formula) return acc if acc.key?(cask_or_formula)

View File

@ -38,7 +38,6 @@ class CaskDependent
requirements << Requirement.new([{ cask: cask_ref }]) requirements << Requirement.new([{ cask: cask_ref }])
end end
requirements << dsl_reqs.macos if dsl_reqs.macos requirements << dsl_reqs.macos if dsl_reqs.macos
requirements << X11Requirement.new if dsl_reqs.x11
requirements requirements
end end

View File

@ -207,7 +207,8 @@ module Homebrew
end end
end end
def flag(*names, description: nil, replacement: nil, required_for: nil, depends_on: nil) def flag(*names, description: nil, replacement: nil, required_for: nil,
depends_on: nil, hidden: false)
required, flag_type = if names.any? { |name| name.end_with? "=" } required, flag_type = if names.any? { |name| name.end_with? "=" }
[OptionParser::REQUIRED_ARGUMENT, :required_flag] [OptionParser::REQUIRED_ARGUMENT, :required_flag]
else else
@ -216,7 +217,7 @@ module Homebrew
names.map! { |name| name.chomp "=" } names.map! { |name| name.chomp "=" }
description = option_to_description(*names) if description.nil? description = option_to_description(*names) if description.nil?
if replacement.nil? if replacement.nil?
process_option(*names, description, type: flag_type) process_option(*names, description, type: flag_type, hidden: hidden)
else else
description += " (disabled#{"; replaced by #{replacement}" if replacement.present?})" description += " (disabled#{"; replaced by #{replacement}" if replacement.present?})"
end end
@ -396,42 +397,16 @@ module Homebrew
end end
end end
def max_named(count) def max_named(_count)
odeprecated "`max_named`", "`named_args max:`" odisabled "`max_named`", "`named_args max:`"
raise TypeError, "Unsupported type #{count.class.name} for max_named" unless count.is_a?(Integer)
@max_named_args = count
end end
def min_named(count_or_type) def min_named(_count_or_type)
odeprecated "`min_named`", "`named_args min:`" odisabled "`min_named`", "`named_args min:`"
case count_or_type
when Integer
@min_named_args = count_or_type
@named_args_type = nil
when Symbol
@min_named_args = 1
@named_args_type = count_or_type
else
raise TypeError, "Unsupported type #{count_or_type.class.name} for min_named"
end
end end
def named(count_or_type) def named(_count_or_type)
odeprecated "`named`", "`named_args`" odisabled "`named`", "`named_args`"
case count_or_type
when Integer
@max_named_args = @min_named_args = count_or_type
@named_args_type = nil
when Symbol
@max_named_args = @min_named_args = 1
@named_args_type = count_or_type
else
raise TypeError, "Unsupported type #{count_or_type.class.name} for named"
end
end end
sig { void } sig { void }
@ -619,7 +594,7 @@ module Homebrew
raise exception if exception raise exception if exception
end end
def process_option(*args, type:) def process_option(*args, type:, hidden: false)
option, = @parser.make_switch(args) option, = @parser.make_switch(args)
@processed_options.reject! { |existing| existing.second == option.long.first } if option.long.first.present? @processed_options.reject! { |existing| existing.second == option.long.first } if option.long.first.present?
@processed_options << [option.short.first, option.long.first, option.arg, option.desc.first] @processed_options << [option.short.first, option.long.first, option.arg, option.desc.first]

View File

@ -44,8 +44,7 @@ module Homebrew
description: "Treat all named arguments as formulae.", description: "Treat all named arguments as formulae.",
}], }],
[:flag, "--env=", { [:flag, "--env=", {
description: "If `std` is passed, use the standard build environment instead of superenv. If `super` is " \ description: "Disabled other than for internal Homebrew use.",
"passed, use superenv even if the formula specifies the standard build environment.",
}], }],
[:switch, "--ignore-dependencies", { [:switch, "--ignore-dependencies", {
description: "An unsupported Homebrew development flag to skip installing any dependencies of any kind. " \ description: "An unsupported Homebrew development flag to skip installing any dependencies of any kind. " \
@ -132,8 +131,10 @@ module Homebrew
args = install_args.parse args = install_args.parse
if args.env.present? if args.env.present?
# TODO: use `replacement: false` for 3.1.0. # Can't use `replacement: false` because `install_args` are used by
odeprecated "brew install --env", "`env :std` in specific formula files" # `build.rb`. Instead, `hide_from_man_page` and don't do anything with
# this argument here.
odisabled "brew install --env", "`env :std` in specific formula files"
end end
args.named.each do |name| args.named.each do |name|
@ -406,7 +407,6 @@ module Homebrew
only_deps: args.only_dependencies?, only_deps: args.only_dependencies?,
include_test_formulae: args.include_test_formulae, include_test_formulae: args.include_test_formulae,
build_from_source_formulae: args.build_from_source_formulae, build_from_source_formulae: args.build_from_source_formulae,
env: args.env,
cc: args.cc, cc: args.cc,
git: args.git?, git: args.git?,
interactive: args.interactive?, interactive: args.interactive?,

View File

@ -34,16 +34,11 @@ module Homebrew
Perform a substring search of cask tokens and formula names for <text>. If <text> Perform a substring search of cask tokens and formula names for <text>. If <text>
is flanked by slashes, it is interpreted as a regular expression. is flanked by slashes, it is interpreted as a regular expression.
The search for <text> is extended online to `homebrew/core` and `homebrew/cask`. The search for <text> is extended online to `homebrew/core` and `homebrew/cask`.
If no <text> is provided, list all locally available formulae (including tapped ones).
No online search is performed.
EOS EOS
switch "--formula", "--formulae", switch "--formula", "--formulae",
description: "Without <text>, list all locally available formulae (no online search is performed). " \ description: "Search online and locally for formulae."
"With <text>, search online and locally for formulae."
switch "--cask", "--casks", switch "--cask", "--casks",
description: "Without <text>, list all locally available casks (including tapped ones, no online " \ description: "Search online and locally for casks."
"search is performed). With <text>, search online and locally for casks."
switch "--desc", switch "--desc",
description: "Search for formulae with a description matching <text> and casks with "\ description: "Search for formulae with a description matching <text> and casks with "\
"a name matching <text>." "a name matching <text>."
@ -65,8 +60,7 @@ module Homebrew
conflicts "--open", "--closed" conflicts "--open", "--closed"
conflicts(*package_manager_switches) conflicts(*package_manager_switches)
# TODO: (3.1) add `min: 1` when the `odeprecated`/`odisabled` for `brew search` with no arguments is removed named_args :text_or_regex, min: 1
named_args :text_or_regex
end end
end end
@ -79,19 +73,6 @@ module Homebrew
return return
end end
if args.no_named?
if args.cask?
raise UsageError, "specifying both --formula and --cask requires <text>" if args.formula?
puts Formatter.columns(Cask::Cask.to_a.map(&:full_name).sort)
else
odisabled "`brew search` with no arguments to output formulae", "`brew formulae`"
puts Formatter.columns(Formula.full_names.sort)
end
return
end
query = args.named.join(" ") query = args.named.join(" ")
string_or_regex = query_regexp(query) string_or_regex = query_regexp(query)
@ -140,7 +121,6 @@ module Homebrew
end end
return unless $stdout.tty? return unless $stdout.tty?
return if args.no_named?
metacharacters = %w[\\ | ( ) [ ] { } ^ $ * + ?].freeze metacharacters = %w[\\ | ( ) [ ] { } ^ $ * + ?].freeze
return unless metacharacters.any? do |char| return unless metacharacters.any? do |char|

View File

@ -17,7 +17,7 @@ class AbstractDownloadStrategy
rescue ArgumentError => e rescue ArgumentError => e
raise unless e.message.include?("timeout") raise unless e.message.include?("timeout")
odeprecated "`def _fetch` in a subclass of `CurlDownloadStrategy`" odisabled "`def _fetch` in a subclass of `CurlDownloadStrategy`"
options.delete(:timeout) options.delete(:timeout)
super(*args, **options) super(*args, **options)
end end
@ -27,7 +27,7 @@ class AbstractDownloadStrategy
class << self class << self
def method_added(method) def method_added(method)
if method == :fetch && instance_method(method).arity.zero? if method == :fetch && instance_method(method).arity.zero?
odeprecated "`def fetch` in a subclass of `#{self}`", odisabled "`def fetch` in a subclass of `#{self}`",
"`def fetch(timeout: nil, **options)` and output a warning " \ "`def fetch(timeout: nil, **options)` and output a warning " \
"when `options` contains new unhandled options" "when `options` contains new unhandled options"

View File

@ -123,9 +123,6 @@ class DependencyCollector
when :linux then LinuxRequirement.new(tags) when :linux then LinuxRequirement.new(tags)
when :macos then MacOSRequirement.new(tags) when :macos then MacOSRequirement.new(tags)
when :maximum_macos then MacOSRequirement.new(tags, comparator: "<=") when :maximum_macos then MacOSRequirement.new(tags, comparator: "<=")
when :osxfuse then OsxfuseRequirement.new(tags)
when :tuntap then TuntapRequirement.new(tags)
when :x11 then X11Requirement.new(tags)
when :xcode then XcodeRequirement.new(tags) when :xcode then XcodeRequirement.new(tags)
else else
raise ArgumentError, "Unsupported special dependency #{spec.inspect}" raise ArgumentError, "Unsupported special dependency #{spec.inspect}"

View File

@ -16,11 +16,6 @@ BOTTLE_ERB = <<-EOS
"#{HOMEBREW_BOTTLE_DEFAULT_DOMAIN}/bottles"].exclude?(root_url) %> "#{HOMEBREW_BOTTLE_DEFAULT_DOMAIN}/bottles"].exclude?(root_url) %>
root_url "<%= root_url %>" root_url "<%= root_url %>"
<% end %> <% end %>
<% if ![HOMEBREW_DEFAULT_PREFIX,
HOMEBREW_MACOS_ARM_DEFAULT_PREFIX,
HOMEBREW_LINUX_DEFAULT_PREFIX].include?(prefix) %>
prefix "<%= prefix %>"
<% end %>
<% if rebuild.positive? %> <% if rebuild.positive? %>
rebuild <%= rebuild %> rebuild <%= rebuild %>
<% end %> <% end %>
@ -471,19 +466,18 @@ module Homebrew
bottle = BottleSpecification.new bottle = BottleSpecification.new
bottle.tap = tap bottle.tap = tap
bottle.root_url(root_url) if root_url bottle.root_url(root_url) if root_url
if relocatable bottle_cellar = if relocatable
if skip_relocation if skip_relocation
bottle.cellar :any_skip_relocation :any_skip_relocation
else else
bottle.cellar :any :any
end end
else else
bottle.cellar cellar cellar
bottle.prefix prefix
end end
bottle.rebuild rebuild bottle.rebuild rebuild
sha256 = bottle_path.sha256 sha256 = bottle_path.sha256
bottle.sha256 sha256 => bottle_tag.to_sym bottle.sha256 cellar: bottle_cellar, bottle_tag.to_sym => sha256
old_spec = f.bottle_specification old_spec = f.bottle_specification
if args.keep_old? && !old_spec.checksums.empty? if args.keep_old? && !old_spec.checksums.empty?
@ -591,7 +585,6 @@ module Homebrew
bottle = BottleSpecification.new bottle = BottleSpecification.new
bottle.root_url bottle_hash["bottle"]["root_url"] bottle.root_url bottle_hash["bottle"]["root_url"]
bottle.prefix bottle_hash["bottle"]["prefix"]
bottle.rebuild bottle_hash["bottle"]["rebuild"] bottle.rebuild bottle_hash["bottle"]["rebuild"]
bottle_hash["bottle"]["tags"].each do |tag, tag_hash| bottle_hash["bottle"]["tags"].each do |tag, tag_hash|
cellar = tag_hash["cellar"] cellar = tag_hash["cellar"]

View File

@ -23,12 +23,16 @@ module Homebrew
description: "Upload to Bintray, but don't publish." description: "Upload to Bintray, but don't publish."
named_args :formula, min: 1 named_args :formula, min: 1
hide_from_man_page!
end end
end end
def mirror def mirror
args = mirror_args.parse args = mirror_args.parse
odeprecated "brew mirror"
bintray_org = args.bintray_org || "homebrew" bintray_org = args.bintray_org || "homebrew"
bintray_repo = args.bintray_repo || "mirror" bintray_repo = args.bintray_repo || "mirror"

View File

@ -32,37 +32,6 @@ module Homebrew
end end
def release_notes def release_notes
args = release_notes_args.parse odisabled "`brew release-notes`", "`brew release`"
odeprecated "`brew release-notes`", "`brew release`"
previous_tag = args.named.first
if previous_tag.present?
most_recent_major_minor_tag = previous_tag.sub(/\d+$/, "0")
one_month_ago = Date.today << 1
previous_tag_date = Date.parse Utils.popen_read(
"git", "-C", HOMEBREW_REPOSITORY, "log", "-1", "--format=%aI", most_recent_major_minor_tag
)
opoo "The latest major/minor release was less than one month ago." if previous_tag_date > one_month_ago
end
previous_tag ||= Utils.popen_read(
"git", "-C", HOMEBREW_REPOSITORY, "tag", "--list", "--sort=-version:refname"
).lines.first.chomp
odie "Could not find any previous tags!" unless previous_tag
end_ref = args.named.second || "origin/master"
[previous_tag, end_ref].each do |ref|
next if quiet_system "git", "-C", HOMEBREW_REPOSITORY, "rev-parse", "--verify", "--quiet", ref
odie "Ref #{ref} does not exist!"
end
release_notes = ReleaseNotes.generate_release_notes previous_tag, end_ref, markdown: args.markdown?
$stderr.puts "Release notes between #{previous_tag} and #{end_ref}:"
puts release_notes
end end
end end

View File

@ -241,31 +241,13 @@ module SharedEnvExtension
# @see https://bugs.python.org/issue6848 # @see https://bugs.python.org/issue6848
sig { void } sig { void }
def ncurses_define def ncurses_define
odeprecated "ENV.ncurses_define" odisabled "ENV.ncurses_define"
append "CPPFLAGS", "-DNCURSES_OPAQUE=0"
end end
# @private # @private
sig { void } sig { void }
def userpaths! def userpaths!
odeprecated "ENV.userpaths!" odisabled "ENV.userpaths!"
path = PATH.new(self["PATH"]).select do |p|
# put Superenv.bin and opt path at the first
p.start_with?("#{HOMEBREW_REPOSITORY}/Library/ENV", "#{HOMEBREW_PREFIX}/opt")
end
path.append(HOMEBREW_PREFIX/"bin") # XXX hot fix to prefer brewed stuff (e.g. python) over /usr/bin.
path.append(self["PATH"]) # reset of self["PATH"]
path.append(
# user paths
ORIGINAL_PATHS.map do |p|
p.realpath.to_s
rescue
nil
end - %w[/usr/X11/bin /opt/X11/bin],
)
self["PATH"] = path
end end
sig { void } sig { void }
@ -347,7 +329,7 @@ module SharedEnvExtension
sig { void } sig { void }
def permit_weak_imports def permit_weak_imports
odeprecated "ENV.permit_weak_imports" odisabled "ENV.permit_weak_imports"
end end
# @private # @private

View File

@ -98,15 +98,6 @@ module Stdenv
old old
end end
%w[O3 O2 Os].each do |opt|
define_method opt do
odisabled "ENV.#{opt}"
send(:remove_from_cflags, /-O./)
send(:append_to_cflags, "-#{opt}")
end
end
%w[O1 O0].each do |opt| %w[O1 O0].each do |opt|
define_method opt do define_method opt do
send(:remove_from_cflags, /-O./) send(:remove_from_cflags, /-O./)
@ -147,38 +138,6 @@ module Stdenv
set_cpu_cflags(map) set_cpu_cflags(map)
end end
sig { void }
def m64
odisabled "ENV.m64"
append_to_cflags "-m64"
append "LDFLAGS", "-arch #{Hardware::CPU.arch_64_bit}"
end
sig { void }
def m32
odisabled "ENV.m32"
append_to_cflags "-m32"
append "LDFLAGS", "-arch #{Hardware::CPU.arch_32_bit}"
end
sig { void }
def universal_binary
odisabled "ENV.universal_binary"
check_for_compiler_universal_support
append_to_cflags Hardware::CPU.universal_archs.as_arch_flags
append "LDFLAGS", Hardware::CPU.universal_archs.as_arch_flags
return if compiler_any_clang?
return unless Hardware::CPU.is_32_bit?
# Can't mix "-march" for a 32-bit CPU with "-arch x86_64"
replace_in_cflags(/-march=\S*/, "-Xarch_#{Hardware::CPU.arch_32_bit} \\0")
end
sig { void } sig { void }
def cxx11 def cxx11
append "CXX", "-std=c++11" append "CXX", "-std=c++11"
@ -190,13 +149,6 @@ module Stdenv
append "CXX", "-stdlib=libc++" if compiler == :clang append "CXX", "-stdlib=libc++" if compiler == :clang
end end
sig { void }
def libstdcxx
odisabled "ENV.libstdcxx"
append "CXX", "-stdlib=libstdc++" if compiler == :clang
end
# @private # @private
sig { params(before: Regexp, after: String).void } sig { params(before: Regexp, after: String).void }
def replace_in_cflags(before, after) def replace_in_cflags(before, after)
@ -226,11 +178,6 @@ module Stdenv
append flags, map.fetch(effective_arch) append flags, map.fetch(effective_arch)
end end
sig { void }
def x11
odisabled "ENV.x11", "depends_on specific X11 formula(e)"
end
# @private # @private
sig { params(map: T::Hash[Symbol, String]).void } sig { params(map: T::Hash[Symbol, String]).void }
def set_cpu_cflags(map = Hardware::CPU.optimization_flags) # rubocop:disable Naming/AccessorMethodName def set_cpu_cflags(map = Hardware::CPU.optimization_flags) # rubocop:disable Naming/AccessorMethodName

View File

@ -293,34 +293,11 @@ module Superenv
[Regexp.last_match(1).to_i, 1].max [Regexp.last_match(1).to_i, 1].max
end end
sig { void }
def universal_binary
odisabled "ENV.universal_binary"
check_for_compiler_universal_support
self["HOMEBREW_ARCHFLAGS"] = Hardware::CPU.universal_archs.as_arch_flags
end
sig { void } sig { void }
def permit_arch_flags def permit_arch_flags
append_to_cccfg "K" append_to_cccfg "K"
end end
sig { void }
def m32
odisabled "ENV.m32"
append "HOMEBREW_ARCHFLAGS", "-m32"
end
sig { void }
def m64
odisabled "ENV.m64"
append "HOMEBREW_ARCHFLAGS", "-m64"
end
sig { void } sig { void }
def cxx11 def cxx11
append_to_cccfg "x" append_to_cccfg "x"
@ -332,37 +309,17 @@ module Superenv
append_to_cccfg "g" if compiler == :clang append_to_cccfg "g" if compiler == :clang
end end
sig { void }
def libstdcxx
odisabled "ENV.libstdcxx"
append_to_cccfg "h" if compiler == :clang
end
# @private # @private
sig { void } sig { void }
def refurbish_args def refurbish_args
append_to_cccfg "O" append_to_cccfg "O"
end end
%w[O3 O2 Os].each do |opt|
define_method opt do
odisabled "ENV.#{opt}"
send(:[]=, "HOMEBREW_OPTIMIZATION_LEVEL", opt)
end
end
%w[O1 O0].each do |opt| %w[O1 O0].each do |opt|
define_method opt do define_method opt do
send(:[]=, "HOMEBREW_OPTIMIZATION_LEVEL", opt) send(:[]=, "HOMEBREW_OPTIMIZATION_LEVEL", opt)
end end
end end
sig { void }
def set_x11_env_if_installed
odisabled "ENV.set_x11_env_if_installed"
end
end end
require "extend/os/extend/ENV/super" require "extend/os/extend/ENV/super"

View File

@ -1,53 +0,0 @@
# typed: false
# frozen_string_literal: true
require "requirement"
class OsxfuseRequirement < Requirement
extend T::Sig
def initialize(tags = [])
odisabled "depends_on :osxfuse", 'on_linux do; depends_on "libfuse"; end'
super(tags)
end
download "https://github.com/libfuse/libfuse"
satisfy(build_env: false) do
next true if libfuse_formula_exists? && Formula["libfuse"].latest_version_installed?
includedirs = %w[
/usr/include
/usr/local/include
]
next true if (includedirs.map do |dir|
File.exist? "#{dir}/fuse.h"
end).any?
false
end
sig { returns(String) }
def message
msg = "libfuse is required for this software.\n"
if libfuse_formula_exists?
<<~EOS
#{msg}Run `brew install libfuse` to install it.
EOS
else
msg + super
end
end
private
sig { returns(T::Boolean) }
def libfuse_formula_exists?
begin
Formula["libfuse"]
rescue FormulaUnavailableError
return false
end
true
end
end

View File

@ -1,36 +0,0 @@
# typed: false
# frozen_string_literal: true
require "requirement"
class OsxfuseRequirement < Requirement
extend T::Sig
def initialize(tags = [])
odisabled "depends_on :osxfuse"
super(tags)
end
download "https://osxfuse.github.io/"
satisfy(build_env: false) { self.class.binary_osxfuse_installed? }
sig { returns(T::Boolean) }
def self.binary_osxfuse_installed?
File.exist?("/usr/local/include/osxfuse/fuse.h") &&
!File.symlink?("/usr/local/include/osxfuse")
end
env do
ENV.append_path "PKG_CONFIG_PATH", HOMEBREW_LIBRARY/"Homebrew/os/mac/pkgconfig/fuse"
unless HOMEBREW_PREFIX.to_s == "/usr/local"
ENV.append_path "HOMEBREW_LIBRARY_PATHS", "/usr/local/lib"
ENV.append_path "HOMEBREW_INCLUDE_PATHS", "/usr/local/include/osxfuse"
end
end
def message
"FUSE for macOS is required for this software. #{super}"
end
end

View File

@ -1,22 +0,0 @@
# typed: false
# frozen_string_literal: true
require "requirement"
class X11Requirement < Requirement
satisfy build_env: false do
next false unless MacOS::XQuartz.installed?
min_version <= MacOS::XQuartz.version
end
undef min_version, message
def min_version
MacOS::XQuartz.minimum_version
end
def message
"XQuartz #{min_version} (or newer) is required for this software. #{super}"
end
end

View File

@ -1,8 +0,0 @@
# typed: strict
# frozen_string_literal: true
if OS.mac?
require "extend/os/mac/requirements/osxfuse_requirement"
elsif OS.linux?
require "extend/os/linux/requirements/osxfuse_requirement"
end

View File

@ -1,4 +0,0 @@
# typed: strict
# frozen_string_literal: true
require "extend/os/mac/requirements/x11_requirement" if OS.mac?

View File

@ -2871,8 +2871,8 @@ class Formula
# @see https://docs.brew.sh/Deprecating-Disabling-and-Removing-Formulae # @see https://docs.brew.sh/Deprecating-Disabling-and-Removing-Formulae
# @see DeprecateDisable::DEPRECATE_DISABLE_REASONS # @see DeprecateDisable::DEPRECATE_DISABLE_REASONS
def deprecate!(date: nil, because: nil) def deprecate!(date: nil, because: nil)
odeprecated "`deprecate!` without a reason", "`deprecate! because: \"reason\"`" if because.blank? odisabled "`deprecate!` without a reason", "`deprecate! because: \"reason\"`" if because.blank?
odeprecated "`deprecate!` without a date", "`deprecate! date: \"#{Date.today}\"`" if date.blank? odisabled "`deprecate!` without a date", "`deprecate! date: \"#{Date.today}\"`" if date.blank?
@deprecation_date = Date.parse(date) if date.present? @deprecation_date = Date.parse(date) if date.present?
@ -2910,8 +2910,8 @@ class Formula
# @see https://docs.brew.sh/Deprecating-Disabling-and-Removing-Formulae # @see https://docs.brew.sh/Deprecating-Disabling-and-Removing-Formulae
# @see DeprecateDisable::DEPRECATE_DISABLE_REASONS # @see DeprecateDisable::DEPRECATE_DISABLE_REASONS
def disable!(date: nil, because: nil) def disable!(date: nil, because: nil)
odeprecated "`disable!` without a reason", "`disable! because: \"reason\"`" if because.blank? odisabled "`disable!` without a reason", "`disable! because: \"reason\"`" if because.blank?
odeprecated "`disable!` without a date", "`disable! date: \"#{Date.today}\"`" if date.blank? odisabled "`disable!` without a date", "`disable! date: \"#{Date.today}\"`" if date.blank?
@disable_date = Date.parse(date) if date.present? @disable_date = Date.parse(date) if date.present?

View File

@ -42,18 +42,18 @@ module Homebrew
assert_not_same: :refute_same, assert_not_same: :refute_same,
}.each do |old_method, new_method| }.each do |old_method, new_method|
define_method(old_method) do |*args| define_method(old_method) do |*args|
# odeprecated old_method, new_method odeprecated old_method, new_method
send(new_method, *args) send(new_method, *args)
end end
end end
def assert_true(act, msg = nil) def assert_true(act, msg = nil)
# odeprecated "assert_true", "assert(...) or assert_equal(true, ...)" odeprecated "assert_true", "assert(...) or assert_equal(true, ...)"
assert_equal(true, act, msg) assert_equal(true, act, msg)
end end
def assert_false(act, msg = nil) def assert_false(act, msg = nil)
# odeprecated "assert_false", "assert(!...) or assert_equal(false, ...)" odeprecated "assert_false", "assert(!...) or assert_equal(false, ...)"
assert_equal(false, act, msg) assert_equal(false, act, msg)
end end

View File

@ -82,9 +82,7 @@ module Hardware
end end
def universal_archs def universal_archs
odeprecated "Hardware::CPU.universal_archs" odisabled "Hardware::CPU.universal_archs"
[arch].extend ArchitectureListExtension
end end
sig { returns(Symbol) } sig { returns(Symbol) }

View File

@ -533,8 +533,7 @@ module Homebrew
rescue ArgumentError => e rescue ArgumentError => e
raise unless e.message.include?("unknown keyword: cask") raise unless e.message.include?("unknown keyword: cask")
odeprecated "`def self.find_versions` in `#{strategy}` without a `cask` parameter" odisabled "`def self.find_versions` in `#{strategy}` without a `cask` parameter"
strategy.find_versions(url, livecheck_regex, &livecheck.strategy_block)
end end
match_version_map = strategy_data[:matches] match_version_map = strategy_data[:matches]
regex = strategy_data[:regex] regex = strategy_data[:regex]

View File

@ -5,8 +5,4 @@ require "requirement"
require "requirements/arch_requirement" require "requirements/arch_requirement"
require "requirements/codesign_requirement" require "requirements/codesign_requirement"
require "requirements/linux_requirement" require "requirements/linux_requirement"
require "requirements/macos_requirement"
require "requirements/osxfuse_requirement"
require "requirements/tuntap_requirement"
require "requirements/x11_requirement"
require "requirements/xcode_requirement" require "requirements/xcode_requirement"

View File

@ -1,20 +0,0 @@
# typed: strict
# frozen_string_literal: true
require "requirement"
# A requirement on FUSE for macOS.
#
# @api private
class OsxfuseRequirement < Requirement
extend T::Sig
cask "osxfuse"
fatal true
sig { returns(String) }
def display_s
"FUSE"
end
end
require "extend/os/requirements/osxfuse_requirement"

View File

@ -1,30 +0,0 @@
# typed: false
# frozen_string_literal: true
require "requirement"
# A requirement on TunTap for macOS.
#
# @api private
class TuntapRequirement < Requirement
extend T::Sig
def initialize(tags = [])
odisabled "depends_on :tuntap"
super(tags)
end
fatal true
cask "tuntap"
satisfy(build_env: false) { self.class.binary_tuntap_installed? }
sig { returns(T::Boolean) }
def self.binary_tuntap_installed?
%w[
/Library/Extensions/tun.kext
/Library/Extensions/tap.kext
/Library/LaunchDaemons/net.sf.tuntaposx.tun.plist
/Library/LaunchDaemons/net.sf.tuntaposx.tap.plist
].all? { |file| File.exist?(file) }
end
end

View File

@ -1,65 +0,0 @@
# typed: false
# frozen_string_literal: true
require "requirement"
# A requirement on X11.
#
# @api private
class X11Requirement < Requirement
extend T::Sig
include Comparable
def initialize(tags = [])
odisabled "depends_on :x11", "depends_on specific X11 formula(e)"
super(tags)
end
fatal true
cask "xquartz"
download "https://xquartz.macosforge.org"
sig { returns(String) }
def min_version
"1.12.2"
end
sig { returns(String) }
def min_xdpyinfo_version
"1.3.0"
end
satisfy build_env: false do
if (which_xorg = which("Xorg"))
version = Utils.popen_read(which_xorg, "-version", err: :out)[/X Server (\d+\.\d+\.\d+)/, 1]
next true if $CHILD_STATUS.success? && version && Version.new(version) >= min_version
end
if (which_xdpyinfo = which("xdpyinfo"))
version = Utils.popen_read(which_xdpyinfo, "-version")[/^xdpyinfo (\d+\.\d+\.\d+)/, 1]
next true if $CHILD_STATUS.success? && version && Version.new(version) >= min_xdpyinfo_version
end
false
end
sig { returns(String) }
def message
"X11 is required for this software, either Xorg #{min_version} or " \
"xdpyinfo #{min_xdpyinfo_version}, or newer. #{super}"
end
def <=>(other)
return unless other.is_a? X11Requirement
0
end
sig { returns(String) }
def inspect
"#<#{self.class.name}: #{tags.inspect}>"
end
end
require "extend/os/requirements/x11_requirement"

View File

@ -101,10 +101,6 @@ module Homebrew
strategy = DownloadStrategyDetector.detect(url, using) strategy = DownloadStrategyDetector.detect(url, using)
if strategy <= CurlDownloadStrategy && !url.start_with?("file") if strategy <= CurlDownloadStrategy && !url.start_with?("file")
# A `brew mirror`'ed URL is usually not yet reachable at the time of
# pull request.
next if url.match?(%r{^https://dl.bintray.com/homebrew/mirror/})
if (http_content_problem = curl_check_http_content(url, specs: specs)) if (http_content_problem = curl_check_http_content(url, specs: specs))
problem http_content_problem problem http_content_problem
end end

View File

@ -422,9 +422,9 @@ end
class BottleSpecification class BottleSpecification
extend T::Sig extend T::Sig
attr_rw :prefix, :rebuild attr_rw :rebuild
attr_accessor :tap attr_accessor :tap
attr_reader :all_tags_cellar, :checksum, :collector, :root_url_specs, :repository attr_reader :all_tags_cellar, :checksum, :collector, :root_url_specs, :repository, :prefix
sig { void } sig { void }
def initialize def initialize
@ -435,15 +435,6 @@ 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)
odisabled "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 ||= if (github_packages_url = GitHubPackages.root_url_if_match(Homebrew::EnvConfig.bottle_domain)) @root_url ||= if (github_packages_url = GitHubPackages.root_url_if_match(Homebrew::EnvConfig.bottle_domain))
@ -462,13 +453,12 @@ class BottleSpecification
end end
def cellar(val = nil) def cellar(val = nil)
# TODO: (3.1) uncomment to deprecate the old bottle syntax if val.present?
# if val.present? odeprecated(
# odeprecated( "`cellar` in a bottle block",
# "`cellar` in a bottle block", "`brew style --fix` on the formula to update the style or use `sha256` with a `cellar:` argument",
# "`brew style --fix` on the formula to update the style or use `sha256` with a `cellar:` argument", )
# ) end
# end
if val.nil? if val.nil?
return collector.dig(Utils::Bottles.tag.to_sym, :cellar) || @all_tags_cellar || Homebrew::DEFAULT_CELLAR return collector.dig(Utils::Bottles.tag.to_sym, :cellar) || @all_tags_cellar || Homebrew::DEFAULT_CELLAR
@ -524,13 +514,12 @@ class BottleSpecification
key.is_a?(String) && value.is_a?(Symbol) && key.match?(sha256_regex) key.is_a?(String) && value.is_a?(Symbol) && key.match?(sha256_regex)
end end
# TODO: (3.1) uncomment to deprecate the old bottle syntax if digest && tag
# if digest && tag odeprecated(
# odeprecated( '`sha256 "digest" => :tag` in a bottle block',
# '`sha256 "digest" => :tag` in a bottle block', '`brew style --fix` on the formula to update the style or use `sha256 tag: "digest"`',
# '`brew style --fix` on the formula to update the style or use `sha256 tag: "digest"`', )
# ) end
# end
end end
tag = Utils::Bottles::Tag.from_symbol(tag) tag = Utils::Bottles::Tag.from_symbol(tag)

View File

@ -530,7 +530,7 @@ describe "brew bottle" do
it "allows new bottle hash to be empty" do it "allows new bottle hash to be empty" do
valid_keys = [:root_url, :prefix, :cellar, :rebuild, :sha256] valid_keys = [:root_url, :prefix, :cellar, :rebuild, :sha256]
old_spec = BottleSpecification.new old_spec = BottleSpecification.new
old_spec.sha256("f59bc65c91e4e698f6f050e1efea0040f57372d4dcf0996cbb8f97ced320403b" => :big_sur) old_spec.sha256(big_sur: "f59bc65c91e4e698f6f050e1efea0040f57372d4dcf0996cbb8f97ced320403b")
expect { homebrew.merge_bottle_spec(valid_keys, old_spec, {}) }.not_to raise_error expect { homebrew.merge_bottle_spec(valid_keys, old_spec, {}) }.not_to raise_error
end end
@ -544,16 +544,6 @@ describe "brew bottle" do
] ]
end end
it "checks for conflicting prefix" do
old_spec = BottleSpecification.new
old_spec.prefix("/opt/failbrew")
new_hash = { "prefix" => "/opt/testbrew" }
expect(homebrew.merge_bottle_spec([:prefix], old_spec, new_hash)).to eq [
['prefix: old: "/opt/failbrew", new: "/opt/testbrew"'],
[],
]
end
it "checks for conflicting rebuild number" do it "checks for conflicting rebuild number" do
old_spec = BottleSpecification.new old_spec = BottleSpecification.new
old_spec.rebuild(1) old_spec.rebuild(1)

View File

@ -830,8 +830,7 @@ describe Formula do
url "foo-1.0" url "foo-1.0"
bottle do bottle do
cellar(:any) sha256 cellar: :any, Utils::Bottles.tag.to_sym => TEST_SHA256
sha256(TEST_SHA256 => Utils::Bottles.tag.to_sym)
end end
end end

View File

@ -15,9 +15,8 @@ describe Formulary do
sha256 TESTBALL_SHA256 sha256 TESTBALL_SHA256
bottle do bottle do
cellar :any_skip_relocation
root_url "file://#{bottle_dir}" root_url "file://#{bottle_dir}"
sha256 "8f9aecd233463da6a4ea55f5f88fc5841718c013f3e2a7941350d6130f1dc149" => :#{Utils::Bottles.tag} sha256 cellar: :any_skip_relocation, #{Utils::Bottles.tag}: "8f9aecd233463da6a4ea55f5f88fc5841718c013f3e2a7941350d6130f1dc149"
end end
def install def install

View File

@ -16,7 +16,7 @@ describe BottleSpecification do
} }
checksums.each_pair do |cat, digest| checksums.each_pair do |cat, digest|
bottle_spec.sha256(digest => cat) bottle_spec.sha256(cat => digest)
checksum, = bottle_spec.checksum_for(cat) checksum, = bottle_spec.checksum_for(cat)
expect(Checksum.new(digest)).to eq(checksum) expect(Checksum.new(digest)).to eq(checksum)
end end
@ -31,7 +31,7 @@ describe BottleSpecification do
] ]
checksums.each do |checksum| checksums.each do |checksum|
bottle_spec.sha256(checksum[:tag] => checksum[:digest], cellar: checksum[:cellar]) bottle_spec.sha256(cellar: checksum[:cellar], checksum[:tag] => checksum[:digest])
digest, tag, cellar = bottle_spec.checksum_for(checksum[:tag]) digest, tag, cellar = bottle_spec.checksum_for(checksum[:tag])
expect(Checksum.new(checksum[:digest])).to eq(digest) expect(Checksum.new(checksum[:digest])).to eq(digest)
expect(checksum[:tag]).to eq(tag) expect(checksum[:tag]).to eq(tag)
@ -41,7 +41,7 @@ describe BottleSpecification do
end end
end end
%w[root_url prefix cellar rebuild].each do |method| %w[root_url rebuild].each do |method|
specify "##{method}" do specify "##{method}" do
object = Object.new object = Object.new
bottle_spec.public_send(method, object) bottle_spec.public_send(method, object)

View File

@ -8,9 +8,8 @@ class TestballBottle < Formula
stable.url "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz" stable.url "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz"
stable.sha256 TESTBALL_SHA256 stable.sha256 TESTBALL_SHA256
stable.bottle do stable.bottle do
cellar :any_skip_relocation
root_url "file://#{TEST_FIXTURE_DIR}/bottles" root_url "file://#{TEST_FIXTURE_DIR}/bottles"
sha256 "8f9aecd233463da6a4ea55f5f88fc5841718c013f3e2a7941350d6130f1dc149" => Utils::Bottles.tag.to_sym sha256 cellar: :any_skip_relocation, Utils::Bottles.tag.to_sym => "8f9aecd233463da6a4ea55f5f88fc5841718c013f3e2a7941350d6130f1dc149"
end end
cxxstdlib_check :skip cxxstdlib_check :skip
end end

View File

@ -403,7 +403,7 @@ module Kernel
# Returns array of architectures that the given command or library is built for. # Returns array of architectures that the given command or library is built for.
def archs_for_command(cmd) def archs_for_command(cmd)
odeprecated "archs_for_command" odisabled "archs_for_command"
cmd = which(cmd) unless Pathname.new(cmd).absolute? cmd = which(cmd) unless Pathname.new(cmd).absolute?
Pathname.new(cmd).archs Pathname.new(cmd).archs

View File

@ -14,7 +14,7 @@ module GitHub
module_function module_function
def open_api(url, data: nil, data_binary_path: nil, request_method: nil, scopes: [].freeze, parse_json: true) def open_api(url, data: nil, data_binary_path: nil, request_method: nil, scopes: [].freeze, parse_json: true)
odeprecated "GitHub.open_api", "GitHub::API.open_rest" odisabled "GitHub.open_api", "GitHub::API.open_rest"
API.open_rest(url, data: data, data_binary_path: data_binary_path, request_method: request_method, API.open_rest(url, data: data, data_binary_path: data_binary_path, request_method: request_method,
scopes: scopes, parse_json: parse_json) scopes: scopes, parse_json: parse_json)
end end

View File

@ -86,10 +86,6 @@ Our macOS continuous integration infrastructure is hosted by [MacStadium's Orka]
[![Powered by MacStadium](https://cloud.githubusercontent.com/assets/125011/22776032/097557ac-eea6-11e6-8ba8-eff22dfd58f1.png)](https://www.macstadium.com) [![Powered by MacStadium](https://cloud.githubusercontent.com/assets/125011/22776032/097557ac-eea6-11e6-8ba8-eff22dfd58f1.png)](https://www.macstadium.com)
Our bottles (binary packages) are hosted by [Bintray](https://bintray.com/homebrew).
[![Downloads by Bintray](https://bintray.com/docs/images/downloads_by_bintray_96.png)](https://bintray.com/homebrew)
Secure password storage and syncing is provided by [1Password for Teams](https://1password.com/teams/). Secure password storage and syncing is provided by [1Password for Teams](https://1password.com/teams/).
[![1Password](https://1password.com/img/redesign/press/logo.c757be5591a513da9c768f8b80829318.svg)](https://1password.com) [![1Password](https://1password.com/img/redesign/press/logo.c757be5591a513da9c768f8b80829318.svg)](https://1password.com)

View File

@ -272,14 +272,14 @@ __fish_brew_complete_arg '--repository' -a '(__fish_brew_suggest_taps_installed)
__fish_brew_complete_cmd '-S' 'Perform a substring search of cask tokens and formula names for text' __fish_brew_complete_cmd '-S' 'Perform a substring search of cask tokens and formula names for text'
__fish_brew_complete_arg '-S' -l cask -d 'Without text, list all locally available casks (including tapped ones, no online search is performed). With text, search online and locally for casks' __fish_brew_complete_arg '-S' -l cask -d 'Search online and locally for casks'
__fish_brew_complete_arg '-S' -l closed -d 'Search for only closed GitHub pull requests' __fish_brew_complete_arg '-S' -l closed -d 'Search for only closed GitHub pull requests'
__fish_brew_complete_arg '-S' -l debian -d 'Search for text in the given package manager\'s list' __fish_brew_complete_arg '-S' -l debian -d 'Search for text in the given package manager\'s list'
__fish_brew_complete_arg '-S' -l debug -d 'Display any debugging information' __fish_brew_complete_arg '-S' -l debug -d 'Display any debugging information'
__fish_brew_complete_arg '-S' -l desc -d 'Search for formulae with a description matching text and casks with a name matching text' __fish_brew_complete_arg '-S' -l desc -d 'Search for formulae with a description matching text and casks with a name matching text'
__fish_brew_complete_arg '-S' -l fedora -d 'Search for text in the given package manager\'s list' __fish_brew_complete_arg '-S' -l fedora -d 'Search for text in the given package manager\'s list'
__fish_brew_complete_arg '-S' -l fink -d 'Search for text in the given package manager\'s list' __fish_brew_complete_arg '-S' -l fink -d 'Search for text in the given package manager\'s list'
__fish_brew_complete_arg '-S' -l formula -d 'Without text, list all locally available formulae (no online search is performed). With text, search online and locally for formulae' __fish_brew_complete_arg '-S' -l formula -d 'Search online and locally for formulae'
__fish_brew_complete_arg '-S' -l help -d 'Show this message' __fish_brew_complete_arg '-S' -l help -d 'Show this message'
__fish_brew_complete_arg '-S' -l macports -d 'Search for text in the given package manager\'s list' __fish_brew_complete_arg '-S' -l macports -d 'Search for text in the given package manager\'s list'
__fish_brew_complete_arg '-S' -l open -d 'Search for only open GitHub pull requests' __fish_brew_complete_arg '-S' -l open -d 'Search for only open GitHub pull requests'
@ -733,7 +733,7 @@ __fish_brew_complete_arg 'instal' -l colorpickerdir -d 'Target location for Colo
__fish_brew_complete_arg 'instal' -l debug -d 'If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory' __fish_brew_complete_arg 'instal' -l debug -d 'If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory'
__fish_brew_complete_arg 'instal' -l dictionarydir -d 'Target location for Dictionaries (default: `~/Library/Dictionaries`)' __fish_brew_complete_arg 'instal' -l dictionarydir -d 'Target location for Dictionaries (default: `~/Library/Dictionaries`)'
__fish_brew_complete_arg 'instal' -l display-times -d 'Print install times for each formula at the end of the run' __fish_brew_complete_arg 'instal' -l display-times -d 'Print install times for each formula at the end of the run'
__fish_brew_complete_arg 'instal' -l env -d 'If `std` is passed, use the standard build environment instead of superenv. If `super` is passed, use superenv even if the formula specifies the standard build environment' __fish_brew_complete_arg 'instal' -l env -d 'Disabled other than for internal Homebrew use'
__fish_brew_complete_arg 'instal' -l fetch-HEAD -d 'Fetch the upstream repository to detect if the HEAD installation of the formula is outdated. Otherwise, the repository\'s HEAD will only be checked for updates when a new stable or development version has been released' __fish_brew_complete_arg 'instal' -l fetch-HEAD -d 'Fetch the upstream repository to detect if the HEAD installation of the formula is outdated. Otherwise, the repository\'s HEAD will only be checked for updates when a new stable or development version has been released'
__fish_brew_complete_arg 'instal' -l fontdir -d 'Target location for Fonts (default: `~/Library/Fonts`)' __fish_brew_complete_arg 'instal' -l fontdir -d 'Target location for Fonts (default: `~/Library/Fonts`)'
__fish_brew_complete_arg 'instal' -l force -d 'Install formulae without checking for previously installed keg-only or non-migrated versions. When installing casks, overwrite existing files (binaries and symlinks are excluded, unless originally from the same cask)' __fish_brew_complete_arg 'instal' -l force -d 'Install formulae without checking for previously installed keg-only or non-migrated versions. When installing casks, overwrite existing files (binaries and symlinks are excluded, unless originally from the same cask)'
@ -781,7 +781,7 @@ __fish_brew_complete_arg 'install' -l colorpickerdir -d 'Target location for Col
__fish_brew_complete_arg 'install' -l debug -d 'If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory' __fish_brew_complete_arg 'install' -l debug -d 'If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory'
__fish_brew_complete_arg 'install' -l dictionarydir -d 'Target location for Dictionaries (default: `~/Library/Dictionaries`)' __fish_brew_complete_arg 'install' -l dictionarydir -d 'Target location for Dictionaries (default: `~/Library/Dictionaries`)'
__fish_brew_complete_arg 'install' -l display-times -d 'Print install times for each formula at the end of the run' __fish_brew_complete_arg 'install' -l display-times -d 'Print install times for each formula at the end of the run'
__fish_brew_complete_arg 'install' -l env -d 'If `std` is passed, use the standard build environment instead of superenv. If `super` is passed, use superenv even if the formula specifies the standard build environment' __fish_brew_complete_arg 'install' -l env -d 'Disabled other than for internal Homebrew use'
__fish_brew_complete_arg 'install' -l fetch-HEAD -d 'Fetch the upstream repository to detect if the HEAD installation of the formula is outdated. Otherwise, the repository\'s HEAD will only be checked for updates when a new stable or development version has been released' __fish_brew_complete_arg 'install' -l fetch-HEAD -d 'Fetch the upstream repository to detect if the HEAD installation of the formula is outdated. Otherwise, the repository\'s HEAD will only be checked for updates when a new stable or development version has been released'
__fish_brew_complete_arg 'install' -l fontdir -d 'Target location for Fonts (default: `~/Library/Fonts`)' __fish_brew_complete_arg 'install' -l fontdir -d 'Target location for Fonts (default: `~/Library/Fonts`)'
__fish_brew_complete_arg 'install' -l force -d 'Install formulae without checking for previously installed keg-only or non-migrated versions. When installing casks, overwrite existing files (binaries and symlinks are excluded, unless originally from the same cask)' __fish_brew_complete_arg 'install' -l force -d 'Install formulae without checking for previously installed keg-only or non-migrated versions. When installing casks, overwrite existing files (binaries and symlinks are excluded, unless originally from the same cask)'
@ -1199,14 +1199,14 @@ __fish_brew_complete_arg 'ruby' -l r -d 'Load a library using `require`'
__fish_brew_complete_cmd 'search' 'Perform a substring search of cask tokens and formula names for text' __fish_brew_complete_cmd 'search' 'Perform a substring search of cask tokens and formula names for text'
__fish_brew_complete_arg 'search' -l cask -d 'Without text, list all locally available casks (including tapped ones, no online search is performed). With text, search online and locally for casks' __fish_brew_complete_arg 'search' -l cask -d 'Search online and locally for casks'
__fish_brew_complete_arg 'search' -l closed -d 'Search for only closed GitHub pull requests' __fish_brew_complete_arg 'search' -l closed -d 'Search for only closed GitHub pull requests'
__fish_brew_complete_arg 'search' -l debian -d 'Search for text in the given package manager\'s list' __fish_brew_complete_arg 'search' -l debian -d 'Search for text in the given package manager\'s list'
__fish_brew_complete_arg 'search' -l debug -d 'Display any debugging information' __fish_brew_complete_arg 'search' -l debug -d 'Display any debugging information'
__fish_brew_complete_arg 'search' -l desc -d 'Search for formulae with a description matching text and casks with a name matching text' __fish_brew_complete_arg 'search' -l desc -d 'Search for formulae with a description matching text and casks with a name matching text'
__fish_brew_complete_arg 'search' -l fedora -d 'Search for text in the given package manager\'s list' __fish_brew_complete_arg 'search' -l fedora -d 'Search for text in the given package manager\'s list'
__fish_brew_complete_arg 'search' -l fink -d 'Search for text in the given package manager\'s list' __fish_brew_complete_arg 'search' -l fink -d 'Search for text in the given package manager\'s list'
__fish_brew_complete_arg 'search' -l formula -d 'Without text, list all locally available formulae (no online search is performed). With text, search online and locally for formulae' __fish_brew_complete_arg 'search' -l formula -d 'Search online and locally for formulae'
__fish_brew_complete_arg 'search' -l help -d 'Show this message' __fish_brew_complete_arg 'search' -l help -d 'Show this message'
__fish_brew_complete_arg 'search' -l macports -d 'Search for text in the given package manager\'s list' __fish_brew_complete_arg 'search' -l macports -d 'Search for text in the given package manager\'s list'
__fish_brew_complete_arg 'search' -l open -d 'Search for only open GitHub pull requests' __fish_brew_complete_arg 'search' -l open -d 'Search for only open GitHub pull requests'

View File

@ -348,14 +348,14 @@ _brew___repository() {
# brew -S # brew -S
_brew__s() { _brew__s() {
_arguments \ _arguments \
'--cask[Without text, list all locally available casks (including tapped ones, no online search is performed). With text, search online and locally for casks]' \ '--cask[Search online and locally for casks]' \
'(--open)--closed[Search for only closed GitHub pull requests]' \ '(--open)--closed[Search for only closed GitHub pull requests]' \
'(--macports --fink --opensuse --fedora --ubuntu)--debian[Search for text in the given package manager'\''s list]' \ '(--macports --fink --opensuse --fedora --ubuntu)--debian[Search for text in the given package manager'\''s list]' \
'--debug[Display any debugging information]' \ '--debug[Display any debugging information]' \
'(--pull-request)--desc[Search for formulae with a description matching text and casks with a name matching text]' \ '(--pull-request)--desc[Search for formulae with a description matching text and casks with a name matching text]' \
'(--macports --fink --opensuse --debian --ubuntu)--fedora[Search for text in the given package manager'\''s list]' \ '(--macports --fink --opensuse --debian --ubuntu)--fedora[Search for text in the given package manager'\''s list]' \
'(--macports --opensuse --fedora --debian --ubuntu)--fink[Search for text in the given package manager'\''s list]' \ '(--macports --opensuse --fedora --debian --ubuntu)--fink[Search for text in the given package manager'\''s list]' \
'--formula[Without text, list all locally available formulae (no online search is performed). With text, search online and locally for formulae]' \ '--formula[Search online and locally for formulae]' \
'--help[Show this message]' \ '--help[Show this message]' \
'(--fink --opensuse --fedora --debian --ubuntu)--macports[Search for text in the given package manager'\''s list]' \ '(--fink --opensuse --fedora --debian --ubuntu)--macports[Search for text in the given package manager'\''s list]' \
'(--closed)--open[Search for only open GitHub pull requests]' \ '(--closed)--open[Search for only open GitHub pull requests]' \
@ -909,7 +909,7 @@ _brew_instal() {
'--debug[If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory]' \ '--debug[If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory]' \
'(--formula)--dictionarydir[Target location for Dictionaries (default: `~/Library/Dictionaries`)]' \ '(--formula)--dictionarydir[Target location for Dictionaries (default: `~/Library/Dictionaries`)]' \
'(--cask)--display-times[Print install times for each formula at the end of the run]' \ '(--cask)--display-times[Print install times for each formula at the end of the run]' \
'(--cask)--env[If `std` is passed, use the standard build environment instead of superenv. If `super` is passed, use superenv even if the formula specifies the standard build environment]' \ '(--cask)--env[Disabled other than for internal Homebrew use]' \
'(--cask)--fetch-HEAD[Fetch the upstream repository to detect if the HEAD installation of the formula is outdated. Otherwise, the repository'\''s HEAD will only be checked for updates when a new stable or development version has been released]' \ '(--cask)--fetch-HEAD[Fetch the upstream repository to detect if the HEAD installation of the formula is outdated. Otherwise, the repository'\''s HEAD will only be checked for updates when a new stable or development version has been released]' \
'(--formula)--fontdir[Target location for Fonts (default: `~/Library/Fonts`)]' \ '(--formula)--fontdir[Target location for Fonts (default: `~/Library/Fonts`)]' \
'--force[Install formulae without checking for previously installed keg-only or non-migrated versions. When installing casks, overwrite existing files (binaries and symlinks are excluded, unless originally from the same cask)]' \ '--force[Install formulae without checking for previously installed keg-only or non-migrated versions. When installing casks, overwrite existing files (binaries and symlinks are excluded, unless originally from the same cask)]' \
@ -961,7 +961,7 @@ _brew_install() {
'--debug[If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory]' \ '--debug[If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory]' \
'(--formula)--dictionarydir[Target location for Dictionaries (default: `~/Library/Dictionaries`)]' \ '(--formula)--dictionarydir[Target location for Dictionaries (default: `~/Library/Dictionaries`)]' \
'(--cask)--display-times[Print install times for each formula at the end of the run]' \ '(--cask)--display-times[Print install times for each formula at the end of the run]' \
'(--cask)--env[If `std` is passed, use the standard build environment instead of superenv. If `super` is passed, use superenv even if the formula specifies the standard build environment]' \ '(--cask)--env[Disabled other than for internal Homebrew use]' \
'(--cask)--fetch-HEAD[Fetch the upstream repository to detect if the HEAD installation of the formula is outdated. Otherwise, the repository'\''s HEAD will only be checked for updates when a new stable or development version has been released]' \ '(--cask)--fetch-HEAD[Fetch the upstream repository to detect if the HEAD installation of the formula is outdated. Otherwise, the repository'\''s HEAD will only be checked for updates when a new stable or development version has been released]' \
'(--formula)--fontdir[Target location for Fonts (default: `~/Library/Fonts`)]' \ '(--formula)--fontdir[Target location for Fonts (default: `~/Library/Fonts`)]' \
'--force[Install formulae without checking for previously installed keg-only or non-migrated versions. When installing casks, overwrite existing files (binaries and symlinks are excluded, unless originally from the same cask)]' \ '--force[Install formulae without checking for previously installed keg-only or non-migrated versions. When installing casks, overwrite existing files (binaries and symlinks are excluded, unless originally from the same cask)]' \
@ -1472,14 +1472,14 @@ _brew_ruby() {
# brew search # brew search
_brew_search() { _brew_search() {
_arguments \ _arguments \
'--cask[Without text, list all locally available casks (including tapped ones, no online search is performed). With text, search online and locally for casks]' \ '--cask[Search online and locally for casks]' \
'(--open)--closed[Search for only closed GitHub pull requests]' \ '(--open)--closed[Search for only closed GitHub pull requests]' \
'(--macports --fink --opensuse --fedora --ubuntu)--debian[Search for text in the given package manager'\''s list]' \ '(--macports --fink --opensuse --fedora --ubuntu)--debian[Search for text in the given package manager'\''s list]' \
'--debug[Display any debugging information]' \ '--debug[Display any debugging information]' \
'(--pull-request)--desc[Search for formulae with a description matching text and casks with a name matching text]' \ '(--pull-request)--desc[Search for formulae with a description matching text and casks with a name matching text]' \
'(--macports --fink --opensuse --debian --ubuntu)--fedora[Search for text in the given package manager'\''s list]' \ '(--macports --fink --opensuse --debian --ubuntu)--fedora[Search for text in the given package manager'\''s list]' \
'(--macports --opensuse --fedora --debian --ubuntu)--fink[Search for text in the given package manager'\''s list]' \ '(--macports --opensuse --fedora --debian --ubuntu)--fink[Search for text in the given package manager'\''s list]' \
'--formula[Without text, list all locally available formulae (no online search is performed). With text, search online and locally for formulae]' \ '--formula[Search online and locally for formulae]' \
'--help[Show this message]' \ '--help[Show this message]' \
'(--fink --opensuse --fedora --debian --ubuntu)--macports[Search for text in the given package manager'\''s list]' \ '(--fink --opensuse --fedora --debian --ubuntu)--macports[Search for text in the given package manager'\''s list]' \
'(--closed)--open[Search for only open GitHub pull requests]' \ '(--closed)--open[Search for only open GitHub pull requests]' \

View File

@ -8,7 +8,7 @@ If a bottle is available and usable it will be downloaded and poured automatical
Bottles will not be used if the user requests it (see above), if the formula requests it (with `pour_bottle?`), if any options are specified during installation (bottles are all compiled with default options), if the bottle is not up to date (e.g. lacking a checksum) or if the bottle's `cellar` is not `:any` nor equal to the current `HOMEBREW_CELLAR`. Bottles will not be used if the user requests it (see above), if the formula requests it (with `pour_bottle?`), if any options are specified during installation (bottles are all compiled with default options), if the bottle is not up to date (e.g. lacking a checksum) or if the bottle's `cellar` is not `:any` nor equal to the current `HOMEBREW_CELLAR`.
## Creation ## Creation
Bottles are created using the [Brew Test Bot](Brew-Test-Bot.md), usually when people submit pull requests to Homebrew. The `bottle do` block is updated by maintainers when they merge a pull request. For the Homebrew organisations' taps they are uploaded to and downloaded from [Bintray](https://bintray.com/homebrew). Bottles are created using the [Brew Test Bot](Brew-Test-Bot.md), usually when people submit pull requests to Homebrew. The `bottle do` block is updated by maintainers when they merge a pull request. For the Homebrew organisations' taps they are uploaded to and downloaded from [GitHub Packages](https://github.com/orgs/Homebrew/packages).
By default, bottles will be built for the oldest CPU supported by the OS/architecture you're building for (Core 2 for 64-bit OSs). This ensures that bottles are compatible with all computers you might distribute them to. If you *really* want your bottles to be optimised for something else, you can pass the `--bottle-arch=` option to build for another architecture; for example, `brew install foo --build-bottle --bottle-arch=penryn`. Just remember that if you build for a newer architecture some of your users might get binaries they can't run and that would be sad! By default, bottles will be built for the oldest CPU supported by the OS/architecture you're building for (Core 2 for 64-bit OSs). This ensures that bottles are compatible with all computers you might distribute them to. If you *really* want your bottles to be optimised for something else, you can pass the `--bottle-arch=` option to build for another architecture; for example, `brew install foo --build-bottle --bottle-arch=penryn`. Just remember that if you build for a newer architecture some of your users might get binaries they can't run and that would be sad!

View File

@ -63,7 +63,7 @@ Read our [contribution guidelines](https://github.com/Homebrew/brew/blob/HEAD/CO
## Why do you compile everything? ## Why do you compile everything?
Homebrew provides pre-compiled versions for many formulae. These Homebrew provides pre-compiled versions for many formulae. These
pre-compiled versions are referred to as [bottles](Bottles.md) and are available pre-compiled versions are referred to as [bottles](Bottles.md) and are available
at <https://bintray.com/homebrew/bottles>. at <https://github.com/Homebrew/homebrew-core/packages>.
If available, bottled binaries will be used by default except under the If available, bottled binaries will be used by default except under the
following conditions: following conditions:

View File

@ -273,7 +273,7 @@ the installed formulae or, every 30 days, for all formulae.
* `--formula`: * `--formula`:
Treat all named arguments as formulae. Treat all named arguments as formulae.
* `--env`: * `--env`:
If `std` is passed, use the standard build environment instead of superenv. If `super` is passed, use superenv even if the formula specifies the standard build environment. Disabled other than for internal Homebrew use.
* `--ignore-dependencies`: * `--ignore-dependencies`:
An unsupported Homebrew development flag to skip installing any dependencies of any kind. If the dependencies are not already present, the formula will have issues. If you're not developing Homebrew, consider adjusting your PATH rather than using this flag. An unsupported Homebrew development flag to skip installing any dependencies of any kind. If the dependencies are not already present, the formula will have issues. If you're not developing Homebrew, consider adjusting your PATH rather than using this flag.
* `--only-dependencies`: * `--only-dependencies`:
@ -482,19 +482,16 @@ reinstalled formulae or, every 30 days, for all formulae.
* `--skip-cask-deps`: * `--skip-cask-deps`:
Skip installing cask dependencies. Skip installing cask dependencies.
### `search`, `-S` [*`options`*] [*`text`*|`/`*`regex`*`/` ...] ### `search`, `-S` [*`options`*] *`text`*|`/`*`regex`*`/` [...]
Perform a substring search of cask tokens and formula names for *`text`*. If *`text`* Perform a substring search of cask tokens and formula names for *`text`*. If *`text`*
is flanked by slashes, it is interpreted as a regular expression. is flanked by slashes, it is interpreted as a regular expression.
The search for *`text`* is extended online to `homebrew/core` and `homebrew/cask`. The search for *`text`* is extended online to `homebrew/core` and `homebrew/cask`.
If no *`text`* is provided, list all locally available formulae (including tapped ones).
No online search is performed.
* `--formula`: * `--formula`:
Without *`text`*, list all locally available formulae (no online search is performed). With *`text`*, search online and locally for formulae. Search online and locally for formulae.
* `--cask`: * `--cask`:
Without *`text`*, list all locally available casks (including tapped ones, no online search is performed). With *`text`*, search online and locally for casks. Search online and locally for casks.
* `--desc`: * `--desc`:
Search for formulae with a description matching *`text`* and casks with a name matching *`text`*. Search for formulae with a description matching *`text`* and casks with a name matching *`text`*.
* `--pull-request`: * `--pull-request`:
@ -1117,17 +1114,6 @@ Generate Homebrew's manpages.
* `--fail-if-not-changed`: * `--fail-if-not-changed`:
Return a failing status code if no changes are detected in the manpage outputs. This can be used to notify CI when the manpages are out of date. Additionally, the date used in new manpages will match those in the existing manpages (to allow comparison without factoring in the date). Return a failing status code if no changes are detected in the manpage outputs. This can be used to notify CI when the manpages are out of date. Additionally, the date used in new manpages will match those in the existing manpages (to allow comparison without factoring in the date).
### `mirror` [*`options`*] *`formula`* [...]
Reupload the stable URL of a formula to Bintray for use as a mirror.
* `--bintray-org`:
Upload to the specified Bintray organisation (default: `homebrew`).
* `--bintray-repo`:
Upload to the specified Bintray repository (default: `mirror`).
* `--no-publish`:
Upload to Bintray, but don't publish.
### `pr-automerge` [*`options`*] ### `pr-automerge` [*`options`*]
Find pull requests that can be automatically merged using `brew pr-publish`. Find pull requests that can be automatically merged using `brew pr-publish`.

View File

@ -58,7 +58,6 @@ Thanks for all your work so far!
If they accept, follow a few steps to get them set up: If they accept, follow a few steps to get them set up:
- Invite them to the [**@Homebrew/maintainers** team](https://github.com/orgs/Homebrew/teams/maintainers) (or any relevant [subteams](https://github.com/orgs/Homebrew/teams/maintainers/teams)) to give them write access to relevant repositories (but don't make them owners). They will need to enable [GitHub's Two Factor Authentication](https://help.github.com/articles/about-two-factor-authentication/). - Invite them to the [**@Homebrew/maintainers** team](https://github.com/orgs/Homebrew/teams/maintainers) (or any relevant [subteams](https://github.com/orgs/Homebrew/teams/maintainers/teams)) to give them write access to relevant repositories (but don't make them owners). They will need to enable [GitHub's Two Factor Authentication](https://help.github.com/articles/about-two-factor-authentication/).
- Ask them to sign in to [Bintray](https://bintray.com) using their GitHub account and they should auto-sync to [Bintray's Homebrew organisation](https://bintray.com/homebrew/organization/edit/members) as a member so they can publish new bottles.
- Invite them to the [`homebrew-maintainers` private maintainers mailing list](https://lists.sfconservancy.org/mailman/admin/homebrew-maintainers/members/add). - Invite them to the [`homebrew-maintainers` private maintainers mailing list](https://lists.sfconservancy.org/mailman/admin/homebrew-maintainers/members/add).
- Invite them to the [`machomebrew` private maintainers Slack](https://machomebrew.slack.com/admin/invites) (and ensure they've read the [communication guidelines](Maintainer-Guidelines.md#communication)) and ask them to use their real name there (rather than a pseudonym they may use on e.g. GitHub). - Invite them to the [`machomebrew` private maintainers Slack](https://machomebrew.slack.com/admin/invites) (and ensure they've read the [communication guidelines](Maintainer-Guidelines.md#communication)) and ask them to use their real name there (rather than a pseudonym they may use on e.g. GitHub).
- Ask them to disable SMS as a 2FA device or fallback on their GitHub account in favour of using one of the other authentication methods. - Ask them to disable SMS as a 2FA device or fallback on their GitHub account in favour of using one of the other authentication methods.

View File

@ -346,7 +346,7 @@ Treat all named arguments as formulae\.
. .
.TP .TP
\fB\-\-env\fR \fB\-\-env\fR
If \fBstd\fR is passed, use the standard build environment instead of superenv\. If \fBsuper\fR is passed, use superenv even if the formula specifies the standard build environment\. Disabled other than for internal Homebrew use\.
. .
.TP .TP
\fB\-\-ignore\-dependencies\fR \fB\-\-ignore\-dependencies\fR
@ -654,19 +654,16 @@ Disable/enable quarantining of downloads (default: enabled)\.
\fB\-\-skip\-cask\-deps\fR \fB\-\-skip\-cask\-deps\fR
Skip installing cask dependencies\. Skip installing cask dependencies\.
. .
.SS "\fBsearch\fR, \fB\-S\fR [\fIoptions\fR] [\fItext\fR|\fB/\fR\fIregex\fR\fB/\fR \.\.\.]" .SS "\fBsearch\fR, \fB\-S\fR [\fIoptions\fR] \fItext\fR|\fB/\fR\fIregex\fR\fB/\fR [\.\.\.]"
Perform a substring search of cask tokens and formula names for \fItext\fR\. If \fItext\fR is flanked by slashes, it is interpreted as a regular expression\. The search for \fItext\fR is extended online to \fBhomebrew/core\fR and \fBhomebrew/cask\fR\. Perform a substring search of cask tokens and formula names for \fItext\fR\. If \fItext\fR is flanked by slashes, it is interpreted as a regular expression\. The search for \fItext\fR is extended online to \fBhomebrew/core\fR and \fBhomebrew/cask\fR\.
. .
.P
If no \fItext\fR is provided, list all locally available formulae (including tapped ones)\. No online search is performed\.
.
.TP .TP
\fB\-\-formula\fR \fB\-\-formula\fR
Without \fItext\fR, list all locally available formulae (no online search is performed)\. With \fItext\fR, search online and locally for formulae\. Search online and locally for formulae\.
. .
.TP .TP
\fB\-\-cask\fR \fB\-\-cask\fR
Without \fItext\fR, list all locally available casks (including tapped ones, no online search is performed)\. With \fItext\fR, search online and locally for casks\. Search online and locally for casks\.
. .
.TP .TP
\fB\-\-desc\fR \fB\-\-desc\fR
@ -1552,21 +1549,6 @@ Generate Homebrew\'s manpages\.
\fB\-\-fail\-if\-not\-changed\fR \fB\-\-fail\-if\-not\-changed\fR
Return a failing status code if no changes are detected in the manpage outputs\. This can be used to notify CI when the manpages are out of date\. Additionally, the date used in new manpages will match those in the existing manpages (to allow comparison without factoring in the date)\. Return a failing status code if no changes are detected in the manpage outputs\. This can be used to notify CI when the manpages are out of date\. Additionally, the date used in new manpages will match those in the existing manpages (to allow comparison without factoring in the date)\.
. .
.SS "\fBmirror\fR [\fIoptions\fR] \fIformula\fR [\.\.\.]"
Reupload the stable URL of a formula to Bintray for use as a mirror\.
.
.TP
\fB\-\-bintray\-org\fR
Upload to the specified Bintray organisation (default: \fBhomebrew\fR)\.
.
.TP
\fB\-\-bintray\-repo\fR
Upload to the specified Bintray repository (default: \fBmirror\fR)\.
.
.TP
\fB\-\-no\-publish\fR
Upload to Bintray, but don\'t publish\.
.
.SS "\fBpr\-automerge\fR [\fIoptions\fR]" .SS "\fBpr\-automerge\fR [\fIoptions\fR]"
Find pull requests that can be automatically merged using \fBbrew pr\-publish\fR\. Find pull requests that can be automatically merged using \fBbrew pr\-publish\fR\.
. .