More deprecated/disabled updates
- remove odisabled - move odeprecated to odisabled
This commit is contained in:
parent
53ecfda2b7
commit
fc418fd333
@ -38,8 +38,6 @@ module Homebrew
|
|||||||
def tap
|
def tap
|
||||||
if ARGV.include? "--repair"
|
if ARGV.include? "--repair"
|
||||||
Tap.each(&:link_completions_and_manpages)
|
Tap.each(&:link_completions_and_manpages)
|
||||||
elsif ARGV.include? "--list-official"
|
|
||||||
odisabled("brew tap --list-official")
|
|
||||||
elsif ARGV.include? "--list-pinned"
|
elsif ARGV.include? "--list-pinned"
|
||||||
puts Tap.select(&:pinned?).map(&:name)
|
puts Tap.select(&:pinned?).map(&:name)
|
||||||
elsif ARGV.named.empty?
|
elsif ARGV.named.empty?
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
require "compat/os/mac"
|
|
||||||
require "compat/requirements/x11_requirement"
|
require "compat/requirements/x11_requirement"
|
||||||
require "compat/requirements/xcode_requirement"
|
require "compat/requirements/xcode_requirement"
|
||||||
require "compat/dependable"
|
require "compat/cask"
|
||||||
require "compat/dependency_collector"
|
|
||||||
require "compat/download_strategy"
|
require "compat/download_strategy"
|
||||||
require "compat/fileutils"
|
require "compat/fileutils"
|
||||||
require "compat/formula_support"
|
|
||||||
require "compat/cask"
|
|
||||||
require "compat/tap"
|
require "compat/tap"
|
||||||
|
@ -6,6 +6,8 @@ module Cask
|
|||||||
module Compat
|
module Compat
|
||||||
private
|
private
|
||||||
|
|
||||||
|
# TODO: can't delete this code until the merge of
|
||||||
|
# https://github.com/Homebrew/brew/pull/4730 or an equivalent.
|
||||||
def cask(header_token, **options, &block)
|
def cask(header_token, **options, &block)
|
||||||
if header_token.is_a?(Hash) && header_token.key?(:v1)
|
if header_token.is_a?(Hash) && header_token.key?(:v1)
|
||||||
odisabled %q("cask :v1 => 'token'"), %q("cask 'token'")
|
odisabled %q("cask :v1 => 'token'"), %q("cask 'token'")
|
||||||
|
@ -16,9 +16,7 @@ module Cask
|
|||||||
end
|
end
|
||||||
|
|
||||||
def run
|
def run
|
||||||
odeprecated "`brew cask --version`", "`brew --version`", disable_on: Time.new(2018, 10, 31)
|
odisabled "`brew cask --version`", "`brew --version`"
|
||||||
ARGV.clear
|
|
||||||
Homebrew.__version
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.help
|
def self.help
|
||||||
|
@ -22,18 +22,7 @@ module Cask
|
|||||||
end
|
end
|
||||||
|
|
||||||
def run
|
def run
|
||||||
odeprecated "`brew cask cleanup`", "`brew cleanup`", disable_on: Time.new(2018, 9, 30)
|
odisabled "`brew cask cleanup`", "`brew cleanup`"
|
||||||
|
|
||||||
cleanup = Homebrew::Cleanup.new
|
|
||||||
|
|
||||||
casks(alternative: -> { Cask.to_a }).each do |cask|
|
|
||||||
cleanup.cleanup_cask(cask)
|
|
||||||
end
|
|
||||||
|
|
||||||
return if cleanup.disk_cleanup_size.zero?
|
|
||||||
|
|
||||||
disk_space = disk_usage_readable(cleanup.disk_cleanup_size)
|
|
||||||
ohai "This operation has freed approximately #{disk_space} of disk space."
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -6,8 +6,7 @@ module Cask
|
|||||||
module Compat
|
module Compat
|
||||||
class Search < AbstractCommand
|
class Search < AbstractCommand
|
||||||
def run
|
def run
|
||||||
odeprecated "`brew cask search`", "`brew search`", disable_on: Time.new(2018, 9, 30)
|
odisabled "`brew cask search`", "`brew search`"
|
||||||
Homebrew.search(args.empty? ? "--casks" : args)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.visible
|
def self.visible
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
module Cask
|
module Cask
|
||||||
class DSL
|
class DSL
|
||||||
module Compat
|
module Compat
|
||||||
|
# TODO: can't delete this code until the merge of
|
||||||
|
# https://github.com/Homebrew/brew/pull/4730 or an equivalent.
|
||||||
|
|
||||||
def gpg(*)
|
def gpg(*)
|
||||||
odeprecated "the `gpg` stanza", disable_on: Time.new(2018, 12, 31)
|
odisabled "the `gpg` stanza"
|
||||||
end
|
end
|
||||||
|
|
||||||
def license(*)
|
def license(*)
|
||||||
@ -10,7 +13,7 @@ module Cask
|
|||||||
end
|
end
|
||||||
|
|
||||||
def accessibility_access(*)
|
def accessibility_access(*)
|
||||||
odeprecated "the `accessibility_access` stanza"
|
odisabled "the `accessibility_access` stanza"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
module Dependable
|
|
||||||
module Compat
|
|
||||||
def run?
|
|
||||||
odisabled "Dependable#run?"
|
|
||||||
tags.include? :run
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
prepend Compat
|
|
||||||
end
|
|
@ -1,12 +0,0 @@
|
|||||||
require "dependency_collector"
|
|
||||||
|
|
||||||
class DependencyCollector
|
|
||||||
module Compat
|
|
||||||
def parse_string_spec(spec, tags)
|
|
||||||
odisabled "'depends_on ... => :run'" if tags.include?(:run)
|
|
||||||
super
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
prepend Compat
|
|
||||||
end
|
|
@ -2,16 +2,12 @@ require "fileutils"
|
|||||||
|
|
||||||
module FileUtils
|
module FileUtils
|
||||||
module Compat
|
module Compat
|
||||||
def ruby(*args)
|
def ruby(*)
|
||||||
odeprecated "ruby", 'system "ruby"'
|
odisabled "ruby", 'system "ruby"'
|
||||||
system RUBY_PATH, *args
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def mktemp(prefix = name, opts = {})
|
def mktemp(*)
|
||||||
odeprecated("FileUtils.mktemp", "mktemp")
|
odisabled("FileUtils.mktemp", "mktemp")
|
||||||
Mktemp.new(prefix, opts).run do |staging|
|
|
||||||
yield staging
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
module_function :mktemp
|
module_function :mktemp
|
||||||
end
|
end
|
||||||
|
@ -1,75 +0,0 @@
|
|||||||
require "formula_support"
|
|
||||||
|
|
||||||
class KegOnlyReason
|
|
||||||
module Compat
|
|
||||||
def valid?
|
|
||||||
case @reason
|
|
||||||
when :provided_pre_mountain_lion
|
|
||||||
odisabled "keg_only :provided_pre_mountain_lion"
|
|
||||||
MacOS.version < :mountain_lion
|
|
||||||
when :provided_pre_mavericks
|
|
||||||
odisabled "keg_only :provided_pre_mavericks"
|
|
||||||
MacOS.version < :mavericks
|
|
||||||
when :provided_pre_el_capitan
|
|
||||||
odisabled "keg_only :provided_pre_el_capitan"
|
|
||||||
MacOS.version < :el_capitan
|
|
||||||
when :provided_pre_high_sierra
|
|
||||||
odisabled "keg_only :provided_pre_high_sierra"
|
|
||||||
MacOS.version < :high_sierra
|
|
||||||
when :provided_until_xcode43
|
|
||||||
odisabled "keg_only :provided_until_xcode43"
|
|
||||||
MacOS::Xcode.version < "4.3"
|
|
||||||
when :provided_until_xcode5
|
|
||||||
odisabled "keg_only :provided_until_xcode5"
|
|
||||||
MacOS::Xcode.version < "5.0"
|
|
||||||
else
|
|
||||||
super
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def to_s
|
|
||||||
case @reason
|
|
||||||
when :provided_pre_mountain_lion
|
|
||||||
odisabled "keg_only :provided_pre_mountain_lion"
|
|
||||||
|
|
||||||
<<~EOS
|
|
||||||
macOS already provides this software in versions before Mountain Lion
|
|
||||||
EOS
|
|
||||||
when :provided_pre_mavericks
|
|
||||||
odisabled "keg_only :provided_pre_mavericks"
|
|
||||||
|
|
||||||
<<~EOS
|
|
||||||
macOS already provides this software in versions before Mavericks
|
|
||||||
EOS
|
|
||||||
when :provided_pre_el_capitan
|
|
||||||
odisabled "keg_only :provided_pre_el_capitan"
|
|
||||||
|
|
||||||
<<~EOS
|
|
||||||
macOS already provides this software in versions before El Capitan
|
|
||||||
EOS
|
|
||||||
when :provided_pre_high_sierra
|
|
||||||
odisabled "keg_only :provided_pre_high_sierra"
|
|
||||||
|
|
||||||
<<~EOS
|
|
||||||
macOS already provides this software in versions before High Sierra
|
|
||||||
EOS
|
|
||||||
when :provided_until_xcode43
|
|
||||||
odisabled "keg_only :provided_until_xcode43"
|
|
||||||
|
|
||||||
<<~EOS
|
|
||||||
Xcode provides this software prior to version 4.3
|
|
||||||
EOS
|
|
||||||
when :provided_until_xcode5
|
|
||||||
odisabled "keg_only :provided_until_xcode5"
|
|
||||||
|
|
||||||
<<~EOS
|
|
||||||
Xcode provides this software prior to version 5
|
|
||||||
EOS
|
|
||||||
else
|
|
||||||
super
|
|
||||||
end.to_s.strip
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
prepend Compat
|
|
||||||
end
|
|
@ -1,14 +0,0 @@
|
|||||||
module OS
|
|
||||||
module Mac
|
|
||||||
class << self
|
|
||||||
module Compat
|
|
||||||
def release
|
|
||||||
odisabled "MacOS.release", "MacOS.version"
|
|
||||||
version
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
prepend Compat
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
@ -2532,7 +2532,6 @@ class Formula
|
|||||||
# version '4.8.1'
|
# version '4.8.1'
|
||||||
# end</pre>
|
# end</pre>
|
||||||
def fails_with(compiler, &block)
|
def fails_with(compiler, &block)
|
||||||
odisabled "fails_with :llvm" if compiler == :llvm
|
|
||||||
specs.each { |spec| spec.fails_with(compiler, &block) }
|
specs.each { |spec| spec.fails_with(compiler, &block) }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -150,10 +150,6 @@ class Requirement
|
|||||||
attr_reader :env_proc, :build
|
attr_reader :env_proc, :build
|
||||||
attr_rw :fatal, :cask, :download
|
attr_rw :fatal, :cask, :download
|
||||||
|
|
||||||
def default_formula(_val = nil)
|
|
||||||
odisabled "Requirement.default_formula"
|
|
||||||
end
|
|
||||||
|
|
||||||
def satisfy(options = nil, &block)
|
def satisfy(options = nil, &block)
|
||||||
return @satisfied if options.nil? && !block_given?
|
return @satisfied if options.nil? && !block_given?
|
||||||
|
|
||||||
|
@ -212,7 +212,6 @@ class SoftwareSpec
|
|||||||
end
|
end
|
||||||
|
|
||||||
def fails_with(compiler, &block)
|
def fails_with(compiler, &block)
|
||||||
odisabled "fails_with :llvm" if compiler == :llvm
|
|
||||||
compiler_failures << CompilerFailure.create(compiler, &block)
|
compiler_failures << CompilerFailure.create(compiler, &block)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user