Merge pull request #5925 from MikeMcQuaid/more-deprecations
Deprecate tap pinning (and remove `odisabled`)
This commit is contained in:
commit
8d01cda922
@ -96,8 +96,6 @@ begin
|
|||||||
# `Homebrew.help` never returns, except for external/unknown commands.
|
# `Homebrew.help` never returns, except for external/unknown commands.
|
||||||
end
|
end
|
||||||
|
|
||||||
odisabled("HOMEBREW_BUILD_FROM_SOURCE", "--build-from-source") if ENV["HOMEBREW_BUILD_FROM_SOURCE"]
|
|
||||||
|
|
||||||
if internal_cmd
|
if internal_cmd
|
||||||
Homebrew.send cmd.to_s.tr("-", "_").downcase
|
Homebrew.send cmd.to_s.tr("-", "_").downcase
|
||||||
elsif which "brew-#{cmd}"
|
elsif which "brew-#{cmd}"
|
||||||
|
|||||||
@ -1,28 +0,0 @@
|
|||||||
require "keg"
|
|
||||||
require "cli_parser"
|
|
||||||
require "cleanup"
|
|
||||||
|
|
||||||
module Homebrew
|
|
||||||
module_function
|
|
||||||
|
|
||||||
def prune_args
|
|
||||||
Homebrew::CLI::Parser.new do
|
|
||||||
usage_banner <<~EOS
|
|
||||||
`prune` [<options>]
|
|
||||||
|
|
||||||
Deprecated. Use `brew cleanup` instead.
|
|
||||||
EOS
|
|
||||||
switch "-n", "--dry-run",
|
|
||||||
description: "Show what would be removed, but do not actually remove anything."
|
|
||||||
switch :verbose
|
|
||||||
switch :debug
|
|
||||||
hide_from_man_page!
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def prune
|
|
||||||
prune_args.parse
|
|
||||||
|
|
||||||
odisabled("'brew prune'", "'brew cleanup --prune-prefix'")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@ -12,10 +12,14 @@ module Homebrew
|
|||||||
by the user. See also `tap-unpin`.
|
by the user. See also `tap-unpin`.
|
||||||
EOS
|
EOS
|
||||||
switch :debug
|
switch :debug
|
||||||
|
hide_from_man_page!
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def tap_pin
|
def tap_pin
|
||||||
|
odeprecated "brew tap-pin user/tap",
|
||||||
|
"fully-scoped user/tap/formula naming"
|
||||||
|
|
||||||
tap_pin_args.parse
|
tap_pin_args.parse
|
||||||
|
|
||||||
ARGV.named.each do |name|
|
ARGV.named.each do |name|
|
||||||
|
|||||||
@ -11,10 +11,14 @@ module Homebrew
|
|||||||
Unpin <tap> so its formulae are no longer prioritised. See also `tap-pin`.
|
Unpin <tap> so its formulae are no longer prioritised. See also `tap-pin`.
|
||||||
EOS
|
EOS
|
||||||
switch :debug
|
switch :debug
|
||||||
|
hide_from_man_page!
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def tap_unpin
|
def tap_unpin
|
||||||
|
odeprecated "brew tap-pin user/tap",
|
||||||
|
"fully-scoped user/tap/formula naming"
|
||||||
|
|
||||||
tap_unpin_args.parse
|
tap_unpin_args.parse
|
||||||
|
|
||||||
ARGV.named.each do |name|
|
ARGV.named.each do |name|
|
||||||
|
|||||||
@ -50,12 +50,6 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
def upgrade
|
def upgrade
|
||||||
if ARGV.include?("--cleanup")
|
|
||||||
odisabled("'brew upgrade --cleanup'")
|
|
||||||
elsif ENV["HOMEBREW_UPGRADE_CLEANUP"]
|
|
||||||
odisabled("'HOMEBREW_UPGRADE_CLEANUP'")
|
|
||||||
end
|
|
||||||
|
|
||||||
upgrade_args.parse
|
upgrade_args.parse
|
||||||
|
|
||||||
FormulaInstaller.prevent_build_flags unless DevelopmentTools.installed?
|
FormulaInstaller.prevent_build_flags unless DevelopmentTools.installed?
|
||||||
|
|||||||
@ -1,2 +0,0 @@
|
|||||||
require "compat/os/mac"
|
|
||||||
require "compat/formula"
|
|
||||||
@ -1,18 +0,0 @@
|
|||||||
class Formula
|
|
||||||
module Compat
|
|
||||||
# Run `scons` using a Homebrew-installed version rather than whatever is
|
|
||||||
# in the `PATH`.
|
|
||||||
def scons(*)
|
|
||||||
odisabled("scons", 'system "scons"')
|
|
||||||
end
|
|
||||||
|
|
||||||
# Run `make` 3.81 or newer.
|
|
||||||
# Uses the system make on Leopard and newer, and the
|
|
||||||
# path to the actually-installed make on Tiger or older.
|
|
||||||
def make(*)
|
|
||||||
odisabled("make", 'system "make"')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
prepend Compat
|
|
||||||
end
|
|
||||||
@ -1,14 +0,0 @@
|
|||||||
module OS
|
|
||||||
module Mac
|
|
||||||
class << self
|
|
||||||
module Compat
|
|
||||||
def prefer_64_bit?
|
|
||||||
odisabled("MacOS.prefer_64_bit?")
|
|
||||||
Hardware::CPU.is_64_bit?
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
prepend Compat
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@ -16,10 +16,7 @@ class CompilerFailure
|
|||||||
attr_reader :name
|
attr_reader :name
|
||||||
|
|
||||||
def version(val = nil)
|
def version(val = nil)
|
||||||
if val
|
@version = Version.parse(val.to_s) if val
|
||||||
@version = Version.parse(val.to_s)
|
|
||||||
odisabled "'fails_with :clang' with 'build' < 600" if name.to_s == "clang" && val.to_i < 600
|
|
||||||
end
|
|
||||||
@version
|
@version
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -2496,15 +2496,10 @@ class Formula
|
|||||||
# version '7.1'
|
# version '7.1'
|
||||||
# end</pre>
|
# end</pre>
|
||||||
def fails_with(compiler, &block)
|
def fails_with(compiler, &block)
|
||||||
odisabled "fails_with :gcc_4_0" if compiler == :gcc_4_0
|
|
||||||
odisabled "fails_with :gcc_4_2" if compiler == :gcc_4_2
|
|
||||||
odisabled "fails_with :gcc" if compiler == :gcc && !block_given?
|
|
||||||
specs.each { |spec| spec.fails_with(compiler, &block) }
|
specs.each { |spec| spec.fails_with(compiler, &block) }
|
||||||
end
|
end
|
||||||
|
|
||||||
def needs(*standards)
|
def needs(*standards)
|
||||||
odisabled "needs :cxx11" if standards.include?(:cxx11)
|
|
||||||
odisabled "needs :cxx14" if standards.include?(:cxx14)
|
|
||||||
specs.each { |spec| spec.needs(*standards) }
|
specs.each { |spec| spec.needs(*standards) }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -460,9 +460,13 @@ module Formulary
|
|||||||
if possible_pinned_tap_formulae.size == 1
|
if possible_pinned_tap_formulae.size == 1
|
||||||
selected_formula = factory(possible_pinned_tap_formulae.first, spec)
|
selected_formula = factory(possible_pinned_tap_formulae.first, spec)
|
||||||
if core_path(ref).file?
|
if core_path(ref).file?
|
||||||
|
odeprecated "brew tap-pin user/tap",
|
||||||
|
"fully-scoped user/tap/formula naming"
|
||||||
opoo <<~EOS
|
opoo <<~EOS
|
||||||
#{ref} is provided by core, but is now shadowed by #{selected_formula.full_name}.
|
#{ref} is provided by core, but is now shadowed by #{selected_formula.full_name}.
|
||||||
|
This behaviour is deprecated and will be removed in Homebrew 2.2.0.
|
||||||
To refer to the core formula, use Homebrew/core/#{ref} instead.
|
To refer to the core formula, use Homebrew/core/#{ref} instead.
|
||||||
|
To refer to the tap formula, use #{selected_formula.full_name} instead.
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
selected_formula
|
selected_formula
|
||||||
|
|||||||
@ -206,15 +206,10 @@ class SoftwareSpec
|
|||||||
end
|
end
|
||||||
|
|
||||||
def fails_with(compiler, &block)
|
def fails_with(compiler, &block)
|
||||||
odisabled "fails_with :gcc_4_0" if compiler == :gcc_4_0
|
|
||||||
odisabled "fails_with :gcc_4_2" if compiler == :gcc_4_2
|
|
||||||
odisabled "fails_with :gcc" if compiler == :gcc && !block_given?
|
|
||||||
compiler_failures << CompilerFailure.create(compiler, &block)
|
compiler_failures << CompilerFailure.create(compiler, &block)
|
||||||
end
|
end
|
||||||
|
|
||||||
def needs(*standards)
|
def needs(*standards)
|
||||||
odisabled "needs :cxx11" if standards.include?(:cxx11)
|
|
||||||
odisabled "needs :cxx14" if standards.include?(:cxx14)
|
|
||||||
standards.each do |standard|
|
standards.each do |standard|
|
||||||
compiler_failures.concat CompilerFailure.for_standard(standard)
|
compiler_failures.concat CompilerFailure.for_standard(standard)
|
||||||
end
|
end
|
||||||
|
|||||||
@ -488,15 +488,6 @@ summary of all installed taps if no *`tap`* are passed.
|
|||||||
* `--json`:
|
* `--json`:
|
||||||
Print a JSON representation of *`taps`*. Currently the default and only accepted value for *`version`* is `v1`. See the docs for examples of using the JSON output: <https://docs.brew.sh/Querying-Brew>
|
Print a JSON representation of *`taps`*. Currently the default and only accepted value for *`version`* is `v1`. See the docs for examples of using the JSON output: <https://docs.brew.sh/Querying-Brew>
|
||||||
|
|
||||||
### `tap-pin` *`tap`*
|
|
||||||
|
|
||||||
Pin *`tap`*, prioritising its formulae over core when formula names are supplied
|
|
||||||
by the user. See also `tap-unpin`.
|
|
||||||
|
|
||||||
### `tap-unpin` *`tap`*
|
|
||||||
|
|
||||||
Unpin *`tap`* so its formulae are no longer prioritised. See also `tap-pin`.
|
|
||||||
|
|
||||||
### `uninstall`, `rm`, `remove` [*`options`*] *`formula`*
|
### `uninstall`, `rm`, `remove` [*`options`*] *`formula`*
|
||||||
|
|
||||||
Uninstall *`formula`*.
|
Uninstall *`formula`*.
|
||||||
|
|||||||
@ -612,12 +612,6 @@ Display information on all installed taps\.
|
|||||||
\fB\-\-json\fR
|
\fB\-\-json\fR
|
||||||
Print a JSON representation of \fItaps\fR\. Currently the default and only accepted value for \fIversion\fR is \fBv1\fR\. See the docs for examples of using the JSON output: \fIhttps://docs\.brew\.sh/Querying\-Brew\fR
|
Print a JSON representation of \fItaps\fR\. Currently the default and only accepted value for \fIversion\fR is \fBv1\fR\. See the docs for examples of using the JSON output: \fIhttps://docs\.brew\.sh/Querying\-Brew\fR
|
||||||
.
|
.
|
||||||
.SS "\fBtap\-pin\fR \fItap\fR"
|
|
||||||
Pin \fItap\fR, prioritising its formulae over core when formula names are supplied by the user\. See also \fBtap\-unpin\fR\.
|
|
||||||
.
|
|
||||||
.SS "\fBtap\-unpin\fR \fItap\fR"
|
|
||||||
Unpin \fItap\fR so its formulae are no longer prioritised\. See also \fBtap\-pin\fR\.
|
|
||||||
.
|
|
||||||
.SS "\fBuninstall\fR, \fBrm\fR, \fBremove\fR [\fIoptions\fR] \fIformula\fR"
|
.SS "\fBuninstall\fR, \fBrm\fR, \fBremove\fR [\fIoptions\fR] \fIformula\fR"
|
||||||
Uninstall \fIformula\fR\.
|
Uninstall \fIformula\fR\.
|
||||||
.
|
.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user