From e04cb899acb40a6114468f266144f92d981f14a0 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 22 Apr 2017 16:53:48 +0100 Subject: [PATCH] tap: warn on tapping deprecated, official taps. They don't contain any formulae so tapping them will add pointless clutter. --- Library/Homebrew/official_taps.rb | 16 ++++++++++++++++ Library/Homebrew/tap.rb | 4 ++++ 2 files changed, 20 insertions(+) diff --git a/Library/Homebrew/official_taps.rb b/Library/Homebrew/official_taps.rb index e069e5265e..dcb65d9f80 100644 --- a/Library/Homebrew/official_taps.rb +++ b/Library/Homebrew/official_taps.rb @@ -15,3 +15,19 @@ OFFICIAL_CMD_TAPS = { "homebrew/test-bot" => ["test-bot"], "homebrew/services" => ["services"], }.freeze + +DEPRECATED_OFFICIAL_TAPS = %w[ + binary + completions + devel-only + dupes + emacs + fuse + games + gui + head-only + python + tex + versions + x11 +].freeze diff --git a/Library/Homebrew/tap.rb b/Library/Homebrew/tap.rb index 99138330b2..c3af73c7e7 100644 --- a/Library/Homebrew/tap.rb +++ b/Library/Homebrew/tap.rb @@ -201,6 +201,10 @@ class Tap quiet = options.fetch(:quiet, false) requested_remote = options[:clone_target] || default_remote + if official? && DEPRECATED_OFFICIAL_TAPS.include?(repo) + opoo "#{name} was deprecated. This tap is now empty as all its formulae were migrated." + end + if installed? raise TapAlreadyTappedError, name unless full_clone raise TapAlreadyUnshallowError, name unless shallow?