remove migrate_taps
We don't need to migrate the tapped formulae from symlink-based to directory-based structure any more. Instead, we add core tap install check for `brew update-report` which will be invoked by `brew update`.
This commit is contained in:
parent
a5cfc011e0
commit
56cb3325a6
@ -37,8 +37,6 @@ module Homebrew
|
||||
end
|
||||
end
|
||||
|
||||
migrate_taps :force => true unless ARGV.dry_run?
|
||||
|
||||
if ObserverPathnameExtension.total.zero?
|
||||
puts "Nothing pruned" if ARGV.verbose?
|
||||
else
|
||||
|
||||
@ -4,7 +4,6 @@ module Homebrew
|
||||
def tap
|
||||
if ARGV.include? "--repair"
|
||||
Tap.each(&:link_manpages)
|
||||
migrate_taps :force => true
|
||||
elsif ARGV.include? "--list-official"
|
||||
require "official_taps"
|
||||
puts OFFICIAL_TAPS.map { |t| "homebrew/#{t}" }
|
||||
@ -36,12 +35,4 @@ module Homebrew
|
||||
true
|
||||
end
|
||||
end
|
||||
|
||||
# Migrate tapped formulae from symlink-based to directory-based structure.
|
||||
def migrate_taps(options = {})
|
||||
ignore = HOMEBREW_LIBRARY/"Formula/.gitignore"
|
||||
return unless ignore.exist? || options.fetch(:force, false)
|
||||
(HOMEBREW_LIBRARY/"Formula").children.each { |c| c.unlink if c.symlink? }
|
||||
ignore.unlink if ignore.exist?
|
||||
end
|
||||
end
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
require "cmd/tap"
|
||||
require "formula_versions"
|
||||
require "migrator"
|
||||
require "formulary"
|
||||
@ -6,8 +5,7 @@ require "descriptions"
|
||||
|
||||
module Homebrew
|
||||
def update_report
|
||||
# migrate to new directories based tap structure
|
||||
migrate_taps
|
||||
install_core_tap_if_necessary
|
||||
|
||||
hub = ReporterHub.new
|
||||
|
||||
@ -63,6 +61,15 @@ module Homebrew
|
||||
def shorten_revision(revision)
|
||||
Utils.popen_read("git", "-C", HOMEBREW_REPOSITORY, "rev-parse", "--short", revision).chomp
|
||||
end
|
||||
|
||||
def install_core_tap_if_necessary
|
||||
core_tap = CoreTap.instance
|
||||
return if core_tap.installed?
|
||||
CoreTap.ensure_installed! :quiet => false
|
||||
revision = core_tap.git_head
|
||||
ENV["HOMEBREW_UPDATE_BEFORE_HOMEBREW_HOMEBREW_CORE"] = revision
|
||||
ENV["HOMEBREW_UPDATE_AFTER_HOMEBREW_HOMEBREW_CORE"] = revision
|
||||
end
|
||||
end
|
||||
|
||||
class Reporter
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user