From 07f0f60908f8bd40b7032ebaadcf16371f2f2136 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Wed, 9 Jul 2014 16:59:16 -0700 Subject: [PATCH] Deprecate some contributions. This is just a starting point to start discussion. I think we have a few options with contributions: - Stop accepting them altogether and move the ones we need/use/support into core commands - Accept them on an unsupported basis and require they be added manually to the PATH - Actively support and fix bugs in them all Closes Homebrew/homebrew#30749. Signed-off-by: Mike McQuaid --- Library/Contributions/cmd/brew-beer.rb | 7 +++++++ Library/Contributions/cmd/brew-bundle-dir.rb | 6 ++++++ Library/Contributions/cmd/brew-bundle.rb | 7 +++++++ Library/Contributions/cmd/brew-graph | 7 ++++++- Library/Contributions/cmd/brew-server | 7 +++++++ Library/Contributions/cmd/brew-services.rb | 8 ++++++++ Library/Contributions/cmd/brew-versions.rb | 5 +++-- Library/Contributions/cmd/brew-which.rb | 13 +++++-------- 8 files changed, 49 insertions(+), 11 deletions(-) diff --git a/Library/Contributions/cmd/brew-beer.rb b/Library/Contributions/cmd/brew-beer.rb index 4ce1f9b9d9..ce380cea0c 100755 --- a/Library/Contributions/cmd/brew-beer.rb +++ b/Library/Contributions/cmd/brew-beer.rb @@ -176,4 +176,11 @@ your friends! Ready to expand your brewing prowess? Thanks for brewin' EOS +opoo <<-EOS.undent + brew beer is deprecated and going to be removed at some point in the + future. If you would like to volunteer to maintain it in a tap please get in + contact with us. Thanks! + +EOS + puts HOMEBREW_BEER diff --git a/Library/Contributions/cmd/brew-bundle-dir.rb b/Library/Contributions/cmd/brew-bundle-dir.rb index 80d662cd7c..c2c6f3a546 100755 --- a/Library/Contributions/cmd/brew-bundle-dir.rb +++ b/Library/Contributions/cmd/brew-bundle-dir.rb @@ -44,6 +44,12 @@ Usage: brew #{NAME} USAGE end +opoo <<-EOS.undent + brew bundle-dir is unsupported and will be removed soon. + Please feel free volunteer to support it in a tap. + +EOS + # command. command = ARGV.first diff --git a/Library/Contributions/cmd/brew-bundle.rb b/Library/Contributions/cmd/brew-bundle.rb index ec1898e090..dff1f2d3be 100755 --- a/Library/Contributions/cmd/brew-bundle.rb +++ b/Library/Contributions/cmd/brew-bundle.rb @@ -27,6 +27,13 @@ def usage exit end +opoo <<-EOS.undent + brew bundle is unsupported and will be replaced with another, + incompatible version at some point. + Please feel free volunteer to support it in a tap. + +EOS + usage if ARGV.include?('--help') || ARGV.include?('-h') path = 'Brewfile' diff --git a/Library/Contributions/cmd/brew-graph b/Library/Contributions/cmd/brew-graph index 07b3464b40..ab042cdbc8 100755 --- a/Library/Contributions/cmd/brew-graph +++ b/Library/Contributions/cmd/brew-graph @@ -5,6 +5,7 @@ $ brew graph | dot -Tsvg -ohomebrew.html $ open homebrew.html """ from __future__ import with_statement +from __future__ import print_function from contextlib import contextmanager import re @@ -14,7 +15,7 @@ import sys def run(command, print_command=False): "Run a command, returning the exit code and output." - if print_command: print command + if print_command: print(command) p = Popen(command, stdout=PIPE) output, errput = p.communicate() return p.returncode, output @@ -361,4 +362,8 @@ def main(): if __name__ == "__main__": + print("""Warning: brew graph is unsupported and will be removed soon. +You should use `brew deps --tree` instead. +Please feel free volunteer to support it in a tap. + """, file=sys.stderr) main() diff --git a/Library/Contributions/cmd/brew-server b/Library/Contributions/cmd/brew-server index c8f3b31181..f3b6b95805 100755 --- a/Library/Contributions/cmd/brew-server +++ b/Library/Contributions/cmd/brew-server @@ -12,6 +12,13 @@ require 'cmd/search' require 'rubygems' +opoo <<-EOS.undent + brew server is unsupported and will be removed soon. + You should use http://braumeister.org instead. + Please feel free volunteer to support it in a tap. + +EOS + begin require 'sinatra' rescue LoadError diff --git a/Library/Contributions/cmd/brew-services.rb b/Library/Contributions/cmd/brew-services.rb index 577994492a..be61f9e843 100755 --- a/Library/Contributions/cmd/brew-services.rb +++ b/Library/Contributions/cmd/brew-services.rb @@ -366,4 +366,12 @@ end # Start the cli dispatch stuff. # + +opoo <<-EOS.undent + brew services is unsupported and will be removed soon. + You should use launchctl instead. + Please feel free volunteer to support it in a tap. + +EOS + ServicesCli.run! diff --git a/Library/Contributions/cmd/brew-versions.rb b/Library/Contributions/cmd/brew-versions.rb index ff3b2bfe08..6a662962df 100755 --- a/Library/Contributions/cmd/brew-versions.rb +++ b/Library/Contributions/cmd/brew-versions.rb @@ -4,9 +4,10 @@ raise "Please `brew update` first" unless (HOMEBREW_REPOSITORY/".git").directory raise FormulaUnspecifiedError if ARGV.named.empty? opoo <<-EOS.undent - brew-versions is unsupported and may be removed soon. - Please use the homebrew-versions tap instead: + brew-versions is unsupported and will be removed soon. + You should use the homebrew-versions tap instead: https://github.com/Homebrew/homebrew-versions + EOS ARGV.formulae.each do |f| versions = FormulaVersions.new(f) diff --git a/Library/Contributions/cmd/brew-which.rb b/Library/Contributions/cmd/brew-which.rb index 4b3b28e0cf..251932dbb6 100755 --- a/Library/Contributions/cmd/brew-which.rb +++ b/Library/Contributions/cmd/brew-which.rb @@ -3,17 +3,14 @@ require 'extend/pathname' module Homebrew def which_versions which_brews=nil opoo <<-EOS.undent - brew-which is unsupported and may be removed soon. + brew which is unsupported and will be removed soon. - To see which versions are installed: - brew list --versions - - To query formula information see: + You should use `brew list --versions` instead. + To query other formula information see: https://github.com/Homebrew/homebrew/wiki/Querying-Brew - For other uses please send a message to the mailing list describing - your use of this command, so a suggestion can be recommended or - implemented. + Please feel free volunteer to support it in a tap. + EOS brew_links = Array.new