aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/audit.rb8
-rw-r--r--Library/Homebrew/cmd/migrate.rb1
-rw-r--r--Library/Homebrew/formula.rb1
-rw-r--r--Library/Homebrew/formulary.rb1
-rw-r--r--Library/Homebrew/migrator.rb9
5 files changed, 6 insertions, 14 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index 342666f8e..a3643e7a6 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -4,10 +4,8 @@ require "utils"
require "extend/ENV"
require "formula_cellar_checks"
require "official_taps"
-require "tap_migrations"
require "cmd/search"
require "date"
-require "formula_renames"
module Homebrew
def audit
@@ -898,11 +896,11 @@ class FormulaAuditor
end
def audit_reverse_migration
- # Only enforce for new formula being re-added to core
+ # Only enforce for new formula being re-added to core and official taps
return unless @strict
- return unless formula.core_formula?
+ return unless formula.tap && formula.tap.official?
- if TAP_MIGRATIONS.key?(formula.name)
+ if formula.tap.tap_migrations.key?(formula.name)
problem <<-EOS.undent
#{formula.name} seems to be listed in tap_migrations.rb!
Please remove #{formula.name} from present tap & tap_migrations.rb
diff --git a/Library/Homebrew/cmd/migrate.rb b/Library/Homebrew/cmd/migrate.rb
index 97f21f78c..b3562b14a 100644
--- a/Library/Homebrew/cmd/migrate.rb
+++ b/Library/Homebrew/cmd/migrate.rb
@@ -1,5 +1,4 @@
require "migrator"
-require "formula_renames"
module Homebrew
def migrate
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 02a781072..7ba5d5044 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -11,7 +11,6 @@ require "install_renamed"
require "pkg_version"
require "tap"
require "core_formula_repository"
-require "formula_renames"
require "keg"
require "migrator"
diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb
index 408714d79..a2f1ad7a1 100644
--- a/Library/Homebrew/formulary.rb
+++ b/Library/Homebrew/formulary.rb
@@ -1,5 +1,4 @@
require "digest/md5"
-require "formula_renames"
require "tap"
require "core_formula_repository"
diff --git a/Library/Homebrew/migrator.rb b/Library/Homebrew/migrator.rb
index d2ef98d5a..3389d57d7 100644
--- a/Library/Homebrew/migrator.rb
+++ b/Library/Homebrew/migrator.rb
@@ -2,7 +2,6 @@ require "formula"
require "formula_lock"
require "keg"
require "tab"
-require "tap_migrations"
class Migrator
class MigrationNeededError < RuntimeError
@@ -126,13 +125,11 @@ class Migrator
if formula.tap == old_tap
true
# Homebrew didn't use to update tabs while performing tap-migrations,
- # so there can be INSTALL_RECEIPT's containing wrong information about
- # tap (tap is Homebrew/homebrew if installed formula migrates to a tap), so
- # we check if there is an entry about oldname migrated to tap and if
+ # so there can be INSTALL_RECEIPT's containing wrong information about tap,
+ # so we check if there is an entry about oldname migrated to tap and if
# newname's tap is the same as tap to which oldname migrated, then we
# can perform migrations and the taps for oldname and newname are the same.
- elsif TAP_MIGRATIONS && (rec = TAP_MIGRATIONS[formula.oldname]) \
- && formula.tap == rec && old_tap == "Homebrew/homebrew"
+ elsif formula.tap && old_tap && formula.tap == old_tap.tap_migrations[formula.oldname]
fix_tabs
true
else