aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/migrator.rb
diff options
context:
space:
mode:
authorXu Cheng2016-02-26 15:33:27 +0800
committerXu Cheng2016-02-26 17:00:17 +0800
commitb52af53e711d442f2b7097a449a6c077664eb7f3 (patch)
tree20f09c893a43311bbb5b3c87732a5021aeec5511 /Library/Homebrew/migrator.rb
parent73b79de7bcd97e10c8d3719988bf08f94373872f (diff)
downloadbrew-b52af53e711d442f2b7097a449a6c077664eb7f3.tar.bz2
various: use Tap abstraction
formula_rename and tap_migrations are now handled inside Tap. Closes Homebrew/homebrew#49549. Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library/Homebrew/migrator.rb')
-rw-r--r--Library/Homebrew/migrator.rb9
1 files changed, 3 insertions, 6 deletions
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