From 0f84b976bab94d66af1f8eb658b5ca824f8d49d4 Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Sat, 19 Dec 2015 19:10:22 +0800 Subject: move CoreFormulaRepository into separate file For users whose local brew is at around 2015-06-11 to 2015-08-06, running `brew update` will emit following error: Error: uninitialized constant Formulary::CoreFormulaRepository This is caused by the same bug described in Homebrew/homebrew#42553. This commit workarounds this issue and restores `brew update` compatibility for users mentioned above. Also cleanup legacy `require "cmd/tap"`. --- Library/Homebrew/cmd/install.rb | 3 ++- Library/Homebrew/cmd/pull.rb | 3 ++- Library/Homebrew/cmd/readall.rb | 3 ++- Library/Homebrew/cmd/tap.rb | 1 + Library/Homebrew/cmd/test-bot.rb | 3 ++- 5 files changed, 9 insertions(+), 4 deletions(-) (limited to 'Library/Homebrew/cmd') diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index 4eb6f1660..dbd8f5c04 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -1,8 +1,9 @@ require "blacklist" require "cmd/doctor" require "cmd/search" -require "cmd/tap" require "formula_installer" +require "tap" +require "core_formula_repository" require "hardware" module Homebrew diff --git a/Library/Homebrew/cmd/pull.rb b/Library/Homebrew/cmd/pull.rb index bcfcb7d11..1454f9938 100644 --- a/Library/Homebrew/cmd/pull.rb +++ b/Library/Homebrew/cmd/pull.rb @@ -3,7 +3,8 @@ require "utils" require "formula" -require "cmd/tap" +require "tap" +require "core_formula_repository" module Homebrew def pull_url(url) diff --git a/Library/Homebrew/cmd/readall.rb b/Library/Homebrew/cmd/readall.rb index 4d74a6f41..7775c2923 100644 --- a/Library/Homebrew/cmd/readall.rb +++ b/Library/Homebrew/cmd/readall.rb @@ -4,7 +4,8 @@ # or to determine if any current formulae have Ruby issues require "formula" -require "cmd/tap" +require "tap" +require "core_formula_repository" require "thread" module Homebrew diff --git a/Library/Homebrew/cmd/tap.rb b/Library/Homebrew/cmd/tap.rb index a7fd3f500..5c1ff089c 100644 --- a/Library/Homebrew/cmd/tap.rb +++ b/Library/Homebrew/cmd/tap.rb @@ -1,4 +1,5 @@ require "tap" +require "core_formula_repository" module Homebrew def tap diff --git a/Library/Homebrew/cmd/test-bot.rb b/Library/Homebrew/cmd/test-bot.rb index b6b167f3f..b297c71d8 100644 --- a/Library/Homebrew/cmd/test-bot.rb +++ b/Library/Homebrew/cmd/test-bot.rb @@ -29,7 +29,8 @@ require "date" require "rexml/document" require "rexml/xmldecl" require "rexml/cdata" -require "cmd/tap" +require "tap" +require "core_formula_repository" module Homebrew BYTES_IN_1_MEGABYTE = 1024*1024 -- cgit v1.2.3