From d31e069ed333ea634dea7558b1ce4933b478535e Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Wed, 30 Oct 2013 11:24:05 -0700 Subject: update: automatically tap migrated formulae. When a formula is removed from core and installed let's tap it so users can get updates without caring which tap we want to put things in. This should allow us to migrate a lot of things to taps. Closes Homebrew/homebrew#23760. --- Library/Homebrew/cmd/update.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Library') diff --git a/Library/Homebrew/cmd/update.rb b/Library/Homebrew/cmd/update.rb index 682c5522a..83e763bdc 100644 --- a/Library/Homebrew/cmd/update.rb +++ b/Library/Homebrew/cmd/update.rb @@ -1,5 +1,6 @@ require 'cmd/tap' require 'cmd/untap' +require 'tap_migrations' module Homebrew extend self def update @@ -55,6 +56,16 @@ module Homebrew extend self Homebrew.unlink_tap_formula(report.removed_tapped_formula) Homebrew.link_tap_formula(report.new_tapped_formula) + # automatically tap any migrated formulae's new tap + report.select_formula(:D).each do |f| + next unless Formula.factory(f).installed? + tap_user, tap_repo = TAP_MIGRATIONS[f].split '/' + begin + install_tap tap_user, tap_repo + rescue AlreadyTappedError => e + end + end + if report.empty? puts "Already up-to-date." else -- cgit v1.2.3