diff --git a/Library/Homebrew/cask/cask.rb b/Library/Homebrew/cask/cask.rb index 02703f440b..ae81755ccf 100644 --- a/Library/Homebrew/cask/cask.rb +++ b/Library/Homebrew/cask/cask.rb @@ -24,10 +24,10 @@ module Cask attr_accessor :download, :allow_reassignment def self.all - # TODO: uncomment for 3.7.0 and ideally avoid using ARGV by moving to e.g. CLI::Parser - # if !ARGV.include?("--eval-all") && !Homebrew::EnvConfig.eval_all? - # odeprecated "Cask::Cask#all without --all or HOMEBREW_EVAL_ALL" - # end + # TODO: ideally avoid using ARGV by moving to e.g. CLI::Parser + if ARGV.exclude?("--eval-all") && !Homebrew::EnvConfig.eval_all? + odeprecated "Cask::Cask#all without --all or HOMEBREW_EVAL_ALL" + end Tap.flat_map(&:cask_files).map do |f| CaskLoader::FromTapPathLoader.new(f).load(config: nil) diff --git a/Library/Homebrew/cmd/deps.rb b/Library/Homebrew/cmd/deps.rb index 541f341e4a..2ca0ca80bc 100644 --- a/Library/Homebrew/cmd/deps.rb +++ b/Library/Homebrew/cmd/deps.rb @@ -84,8 +84,8 @@ module Homebrew all = args.eval_all? if args.all? unless all - odeprecated "brew deps --all", - "brew deps --eval-all or HOMEBREW_EVAL_ALL" + odisabled "brew deps --all", + "brew deps --eval-all or HOMEBREW_EVAL_ALL" end all = true end diff --git a/Library/Homebrew/cmd/desc.rb b/Library/Homebrew/cmd/desc.rb index b38a8ae11f..5fa27f4656 100644 --- a/Library/Homebrew/cmd/desc.rb +++ b/Library/Homebrew/cmd/desc.rb @@ -45,7 +45,7 @@ module Homebrew args = desc_args.parse if !args.eval_all? && !Homebrew::EnvConfig.eval_all? - odeprecated "brew desc", "brew desc --eval-all or HOMEBREW_EVAL_ALL" + odisabled "brew desc", "brew desc --eval-all or HOMEBREW_EVAL_ALL" end search_type = if args.search? diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb index 9495fde636..0393daa4ac 100644 --- a/Library/Homebrew/cmd/info.rb +++ b/Library/Homebrew/cmd/info.rb @@ -110,7 +110,7 @@ module Homebrew elsif args.json all = args.eval_all? if !all && args.all? && !Homebrew::EnvConfig.eval_all? - odeprecated "brew info --all", "brew info --eval-all or HOMEBREW_EVAL_ALL" + odisabled "brew info --all", "brew info --eval-all or HOMEBREW_EVAL_ALL" all = true end diff --git a/Library/Homebrew/cmd/options.rb b/Library/Homebrew/cmd/options.rb index 4b80fa5ad5..d83f825529 100644 --- a/Library/Homebrew/cmd/options.rb +++ b/Library/Homebrew/cmd/options.rb @@ -38,7 +38,7 @@ module Homebrew all = args.eval_all? if args.all? - odeprecated "brew info --all", "brew info --eval-all" if !all && !Homebrew::EnvConfig.eval_all? + odisabled "brew info --all", "brew info --eval-all" if !all && !Homebrew::EnvConfig.eval_all? all = true end diff --git a/Library/Homebrew/cmd/readall.rb b/Library/Homebrew/cmd/readall.rb index 2c7bd4d0af..7c9c3d7104 100644 --- a/Library/Homebrew/cmd/readall.rb +++ b/Library/Homebrew/cmd/readall.rb @@ -46,7 +46,7 @@ module Homebrew options = { aliases: args.aliases?, no_simulate: args.no_simulate? } taps = if args.no_named? if !args.eval_all? && !Homebrew::EnvConfig.eval_all? - odeprecated "brew readall", "brew readall --eval-all or HOMEBREW_EVAL_ALL" + odisabled "brew readall", "brew readall --eval-all or HOMEBREW_EVAL_ALL" end Tap else diff --git a/Library/Homebrew/cmd/search.rb b/Library/Homebrew/cmd/search.rb index bcf50ebf70..386d07ebda 100644 --- a/Library/Homebrew/cmd/search.rb +++ b/Library/Homebrew/cmd/search.rb @@ -78,7 +78,7 @@ module Homebrew if args.desc? if !args.eval_all? && !Homebrew::EnvConfig.eval_all? - odeprecated "brew search --desc", "brew search --desc --eval-all or HOMEBREW_EVAL_ALL" + odisabled "brew search --desc", "brew search --desc --eval-all or HOMEBREW_EVAL_ALL" end Search.search_descriptions(string_or_regex, args) elsif args.pull_request? diff --git a/Library/Homebrew/cmd/uses.rb b/Library/Homebrew/cmd/uses.rb index c194823d44..0b4e6b0f73 100644 --- a/Library/Homebrew/cmd/uses.rb +++ b/Library/Homebrew/cmd/uses.rb @@ -109,14 +109,14 @@ module Homebrew all = args.eval_all? if args.all? unless all - odeprecated "brew uses --all", - "brew uses --eval-all or HOMEBREW_EVAL_ALL" + odisabled "brew uses --all", + "brew uses --eval-all or HOMEBREW_EVAL_ALL" end all = true end if !args.installed? && !(all || Homebrew::EnvConfig.eval_all?) - odeprecated "brew uses", "brew uses --eval-all or HOMEBREW_EVAL_ALL" + odisabled "brew uses", "brew uses --eval-all or HOMEBREW_EVAL_ALL" end if show_formulae_and_casks || args.formula? deps += args.installed? ? Formula.installed : Formula.all diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 25d2990883..62cf434b25 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -134,17 +134,16 @@ module Homebrew [Formula.installed, Cask::Caskroom.casks] elsif args.no_named? if !args.eval_all? && !Homebrew::EnvConfig.eval_all? - odeprecated "brew audit", - "brew audit --eval-all or HOMEBREW_EVAL_ALL" + odisabled "brew audit", + "brew audit --eval-all or HOMEBREW_EVAL_ALL" end no_named_args = true [Formula.all, Cask::Cask.all] else - # TODO: Add deprecation - # if args.named.any? { |named_arg| named_arg.end_with?(".rb") } - # odeprecated "brew audit [path ...]", - # "brew audit [name ...]" - # end + if args.named.any? { |named_arg| named_arg.end_with?(".rb") } + odeprecated "brew audit [path ...]", + "brew audit [name ...]" + end args.named.to_formulae_and_casks .partition { |formula_or_cask| formula_or_cask.is_a?(Formula) } diff --git a/Library/Homebrew/dev-cmd/generate-man-completions.rb b/Library/Homebrew/dev-cmd/generate-man-completions.rb index cacae0ff9e..1732a7a445 100644 --- a/Library/Homebrew/dev-cmd/generate-man-completions.rb +++ b/Library/Homebrew/dev-cmd/generate-man-completions.rb @@ -30,7 +30,7 @@ module Homebrew def generate_man_completions args = generate_man_completions_args.parse - odeprecated "brew generate-man-completions --fail-if-not-changed" if args.fail_if_not_changed? + odisabled "brew generate-man-completions --fail-if-not-changed" if args.fail_if_not_changed? Commands.rebuild_internal_commands_completion_list Manpages.regenerate_man_pages(quiet: args.quiet?) diff --git a/Library/Homebrew/dev-cmd/livecheck.rb b/Library/Homebrew/dev-cmd/livecheck.rb index 3b87f7bf13..a9a4312577 100644 --- a/Library/Homebrew/dev-cmd/livecheck.rb +++ b/Library/Homebrew/dev-cmd/livecheck.rb @@ -59,7 +59,7 @@ module Homebrew all = args.eval_all? if args.all? - odeprecated "brew livecheck --all", "brew livecheck --eval-all" if !all && !Homebrew::EnvConfig.eval_all? + odisabled "brew livecheck --all", "brew livecheck --eval-all" if !all && !Homebrew::EnvConfig.eval_all? all = true end diff --git a/Library/Homebrew/dev-cmd/typecheck.rb b/Library/Homebrew/dev-cmd/typecheck.rb index b68a18834e..05aa183035 100644 --- a/Library/Homebrew/dev-cmd/typecheck.rb +++ b/Library/Homebrew/dev-cmd/typecheck.rb @@ -51,7 +51,7 @@ module Homebrew HOMEBREW_LIBRARY_PATH.cd do if args.update? || args.update_all? - odeprecated "brew typecheck --update --fail-if-not-changed" if args.fail_if_not_changed? + odisabled "brew typecheck --update --fail-if-not-changed" if args.fail_if_not_changed? excluded_gems = [ "did_you_mean", # RBI file is already provided by Sorbet diff --git a/Library/Homebrew/dev-cmd/unbottled.rb b/Library/Homebrew/dev-cmd/unbottled.rb index be766a15f2..5fa7c6e336 100644 --- a/Library/Homebrew/dev-cmd/unbottled.rb +++ b/Library/Homebrew/dev-cmd/unbottled.rb @@ -56,7 +56,7 @@ module Homebrew all = args.eval_all? if args.total? if !all && !Homebrew::EnvConfig.eval_all? - odeprecated "brew unbottled --total", "brew unbottled --total --eval-all or HOMEBREW_EVAL_ALL" + odisabled "brew unbottled --total", "brew unbottled --total --eval-all or HOMEBREW_EVAL_ALL" end all = true end @@ -100,7 +100,7 @@ module Homebrew formulae = all_formulae = args.named.to_formulae elsif args.dependents? if !args.eval_all? && !Homebrew::EnvConfig.eval_all? - odeprecated "brew unbottled --dependents", "brew unbottled --all --dependents or HOMEBREW_EVAL_ALL" + odisabled "brew unbottled --dependents", "brew unbottled --all --dependents or HOMEBREW_EVAL_ALL" end formulae = all_formulae = Formula.all diff --git a/Library/Homebrew/dev-cmd/update-license-data.rb b/Library/Homebrew/dev-cmd/update-license-data.rb index a83fe60055..05326a9ac1 100644 --- a/Library/Homebrew/dev-cmd/update-license-data.rb +++ b/Library/Homebrew/dev-cmd/update-license-data.rb @@ -28,7 +28,7 @@ module Homebrew def update_license_data args = update_license_data_args.parse - odeprecated "brew update-license-data --fail-if-not-changed" if args.fail_if_not_changed? + odisabled "brew update-license-data --fail-if-not-changed" if args.fail_if_not_changed? SPDX.download_latest_license_data! diff = system_command "git", args: [ diff --git a/Library/Homebrew/extend/os/linux/linkage_checker.rb b/Library/Homebrew/extend/os/linux/linkage_checker.rb index 2f672353d3..bb3ac1cf57 100644 --- a/Library/Homebrew/extend/os/linux/linkage_checker.rb +++ b/Library/Homebrew/extend/os/linux/linkage_checker.rb @@ -14,7 +14,6 @@ class LinkageChecker libdl.so.2 libm.so.6 libmvec.so.1 - libnsl.so.1 libnss_files.so.2 libpthread.so.0 libresolv.so.2 @@ -41,13 +40,9 @@ class LinkageChecker # If there's no library deprecated/disabled handling left: # - Remove the `display_` overrides here and the associated generic aliases in HOMEBREW_LIBRARY/linkage_checker.rb - odisabled "linkage to libcrypt.so.1", "libcrypt.so.2 in the libxcrypt formula" if @libcrypt_found - return unless @libnsl_found - odeprecated "linkage to libnsl.so.1", "libnsl.so.3 in the libnsl formula", - disable: fail_on_libnsl1?(strict: strict), - disable_for_developers: false + odisabled "linkage to libnsl.so.1", "libnsl.so.3 in the libnsl formula" end def display_normal_output @@ -61,19 +56,14 @@ class LinkageChecker end def broken_library_linkage?(test: false, strict: false) - generic_broken_library_linkage?(test: test, strict: strict) || (fail_on_libnsl1?(strict: strict) && @libnsl_found) + generic_broken_library_linkage?(test: test, strict: strict) || @libnsl_found end private - def fail_on_libnsl1?(strict:) - strict || ENV["HOMEBREW_DISALLOW_LIBNSL1"].present? - end - def check_dylibs(rebuild_cache:) generic_check_dylibs(rebuild_cache: rebuild_cache) - @libcrypt_found = true if @system_dylibs.any? { |s| File.basename(s) == "libcrypt.so.1" } @libnsl_found = true if @system_dylibs.any? { |s| File.basename(s) == "libnsl.so.1" } # glibc and gcc are implicit dependencies. diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index aaf6edb60f..1a60e448cb 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -1017,7 +1017,6 @@ class Formula # The generated launchd {.plist} file path. sig { returns(Pathname) } def plist_path - # TODO: Add deprecation # odeprecated "formula.plist_path", "formula.launchd_service_path" launchd_service_path end @@ -1836,10 +1835,10 @@ class Formula # this should only be used when users specify `--all` to a command # @private def self.all - # TODO: uncomment for 3.7.0 and ideally avoid using ARGV by moving to e.g. CLI::Parser - # if !ARGV.include?("--eval-all") && !Homebrew::EnvConfig.eval_all? - # odeprecated "Formula#all without --all or HOMEBREW_EVAL_ALL" - # end + # TODO: ideally avoid using ARGV by moving to e.g. CLI::Parser + if ARGV.exclude?("--eval-all") && !Homebrew::EnvConfig.eval_all? + odeprecated "Formula#all without --all or HOMEBREW_EVAL_ALL" + end files.map do |file| Formulary.factory(file) @@ -3153,7 +3152,6 @@ class Formula # # @deprecated Please use {Homebrew::Service.require_root} instead. def plist_options(options) - # TODO: Deprecate # odeprecated "plist_options", "service.require_root" @plist_startup = options[:startup] @plist_manual = options[:manual] diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 24651e9579..cb9aae4e06 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -398,9 +398,8 @@ module Kernel end # GZips the given paths, and returns the gzipped paths. - # TODO: Add deprecation - # odeprecated "Utils.gzip" "Utils::Gzip.compress" def gzip(*paths) + odeprecated "Utils.gzip", "Utils::Gzip.compress" Utils::Gzip.compress(*paths) end