From 571011ad59f37e2094d00a8ce2ec1a8edaba74e6 Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Sun, 6 Dec 2015 22:50:21 +0800 Subject: [PATCH] migrator: tap is a Tap object now --- Library/Homebrew/migrator.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/migrator.rb b/Library/Homebrew/migrator.rb index 0492624ef9..d2ef98d5aa 100644 --- a/Library/Homebrew/migrator.rb +++ b/Library/Homebrew/migrator.rb @@ -31,7 +31,7 @@ class Migrator msg = if tap == "Homebrew/homebrew" "Please try to use #{formula.oldname} to refer the formula.\n" elsif tap - "Please try to use fully-qualified #{Tap.fetch(*tap.split("/"))}/#{formula.oldname} to refer the formula.\n" + "Please try to use fully-qualified #{tap}/#{formula.oldname} to refer the formula.\n" end super <<-EOS.undent @@ -117,7 +117,7 @@ class Migrator # Fix INSTALL_RECEIPTS for tap-migrated formula. def fix_tabs old_tabs.each do |tab| - tab.source["tap"] = formula.tap + tab.tap = formula.tap tab.write end end @@ -132,10 +132,10 @@ class Migrator # 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]) \ - && rec == formula.tap.sub("homebrew-", "") && old_tap == "Homebrew/homebrew" + && formula.tap == rec && old_tap == "Homebrew/homebrew" fix_tabs true - elsif formula.tap + else false end end