diff options
| author | Xu Cheng | 2016-03-06 14:50:33 +0800 |
|---|---|---|
| committer | Xu Cheng | 2016-04-02 21:51:36 +0800 |
| commit | a5cfc011e01f6a57f9251ee6dc88f706d2af79ed (patch) | |
| tree | b1730091d6e855fc5e7507fb2825b34b59c95e68 | |
| parent | c5132daf630f3854e0b0a115bfee820aba334a02 (diff) | |
| download | brew-a5cfc011e01f6a57f9251ee6dc88f706d2af79ed.tar.bz2 | |
various: Homebrew/core is the core tap
Also make `Homebrew/homebrew` as an alias of this tap to keep
backward compatibility.
| -rw-r--r-- | Library/Homebrew/cmd/readall.rb | 1 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/tap-info.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/formula.rb | 6 | ||||
| -rw-r--r-- | Library/Homebrew/formulary.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/tab.rb | 5 | ||||
| -rw-r--r-- | Library/Homebrew/tap.rb | 2 |
6 files changed, 8 insertions, 10 deletions
diff --git a/Library/Homebrew/cmd/readall.rb b/Library/Homebrew/cmd/readall.rb index f006838ea..339819f0d 100644 --- a/Library/Homebrew/cmd/readall.rb +++ b/Library/Homebrew/cmd/readall.rb @@ -38,7 +38,6 @@ module Homebrew if ARGV.named.empty? formulae = Formula.files alias_dirs = Tap.map(&:alias_dir) - alias_dirs.unshift CoreTap.instance.alias_dir else tap = Tap.fetch(ARGV.named.first) raise TapUnavailableError, tap.name unless tap.installed? diff --git a/Library/Homebrew/cmd/tap-info.rb b/Library/Homebrew/cmd/tap-info.rb index 0a59341ff..683a2848d 100644 --- a/Library/Homebrew/cmd/tap-info.rb +++ b/Library/Homebrew/cmd/tap-info.rb @@ -10,8 +10,6 @@ module Homebrew end end - raise "#{tap} is not allowed" if taps.any?(&:core_tap?) - if ARGV.json == "v1" print_tap_json(taps) else diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index c2363fcde..d9c648c9c 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -1073,13 +1073,13 @@ class Formula # an array of all tap {Formula} names # @private def self.tap_names - @tap_names ||= Tap.flat_map(&:formula_names).sort + @tap_names ||= Tap.reject(&:core_tap?).flat_map(&:formula_names).sort end # an array of all tap {Formula} files # @private def self.tap_files - @tap_files ||= Tap.flat_map(&:formula_files) + @tap_files ||= Tap.reject(&:core_tap?).flat_map(&:formula_files) end # an array of all {Formula} names @@ -1152,7 +1152,7 @@ class Formula # an array of all tap aliases # @private def self.tap_aliases - @tap_aliases ||= Tap.flat_map(&:aliases).sort + @tap_aliases ||= Tap.reject(&:core_tap?).flat_map(&:aliases).sort end # an array of all aliases diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index da70aed2f..79e4c946b 100644 --- a/Library/Homebrew/formulary.rb +++ b/Library/Homebrew/formulary.rb @@ -344,7 +344,7 @@ class Formulary if core_path(ref).file? opoo <<-EOS.undent #{ref} is provided by core, but is now shadowed by #{selected_formula.full_name}. - To refer to the core formula, use Homebrew/homebrew/#{ref} instead. + To refer to the core formula, use Homebrew/core/#{ref} instead. EOS end selected_formula diff --git a/Library/Homebrew/tab.rb b/Library/Homebrew/tab.rb index 41697abb8..9b6f28403 100644 --- a/Library/Homebrew/tab.rb +++ b/Library/Homebrew/tab.rb @@ -52,8 +52,9 @@ class Tab < OpenStruct attributes["source"]["tap"] = attributes.delete("tapped_from") end - if attributes["source"]["tap"] == "mxcl/master" - attributes["source"]["tap"] = "Homebrew/homebrew" + if attributes["source"]["tap"] == "mxcl/master" || + attributes["source"]["tap"] == "Homebrew/homebrew" + attributes["source"]["tap"] = "homebrew/core" end if attributes["source"]["spec"].nil? diff --git a/Library/Homebrew/tap.rb b/Library/Homebrew/tap.rb index 32ef0fb9e..0214b39f9 100644 --- a/Library/Homebrew/tap.rb +++ b/Library/Homebrew/tap.rb @@ -30,7 +30,7 @@ class Tap user = "Homebrew" if user == "homebrew" repo = repo.strip_prefix "homebrew-" - if user == "Homebrew" && repo == "homebrew" + if user == "Homebrew" && (repo == "homebrew" || repo == "core") return CoreTap.instance end |
