Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replace PR Homebrew/legacy-homebrew#49752
To deliver this change, one should follow below procedures:
After these changes,
brew --version
will report0.9.9
to help us differentiate pre and post migration.How the migration works?
For usres who have old Homebrew installed, running
brew update
willset motion for following events:
brew update
logic will update Homebrew to the latest commit, i.e. 7cc83ac0006a7125c558b01130a36a6dbbe6757d.tap_migrations.rb
will be loaded. Ahack introduced in the first commit will swap the process to run
brew update
in second time.brew update
logic will set upstream remote toHomebrew/brew
andperform all the necessary migrations.
What's new file system structure?
Library/Formula
andLibrary/Aliases
will be replaced as symlinks pointed to the new tap to keep backward compatibility.Library/tap_migrations.rb
will be replaced as a hack explained above. It has been migrated totap_migrations.json
in theHomebrew/core
tap.Library/formula_renames.rb
will be removed. It has been migrated toformula_renames.json
in theHomebrew/core
tap.homebrew/core
will be installed as core tap./etc/bash_completion.d/brew
and/share/zsh/site-functions/_brew
, so they can be picked up automatically by bash and zsh respected. The main thought is to use this migration as opportunity to avoid git conflict.Test
I set up https://github.com/xu-cheng/homebrew-test as test repo. See https://travis-ci.org/xu-cheng/homebrew-test/builds/114016549
Remaining Works (read: to be addressed in future PRs)
brew legacy-pull
https://gist.github.com/545163571f6c6ae74d6a It can pull homebrew formulae pull request to the new core tap.bash-completion
formula because of shell completion script relocation.