From 0c96d78966b1c3a46096cf0b60d9129c6bf82f37 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 #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