Skip to content

Improve legacy symlink migration.#992

Merged
MikeMcQuaid merged 1 commit intoHomebrew:masterfrom
MikeMcQuaid:migrate-legacy-symlinks-harder
Sep 17, 2016
Merged

Improve legacy symlink migration.#992
MikeMcQuaid merged 1 commit intoHomebrew:masterfrom
MikeMcQuaid:migrate-legacy-symlinks-harder

Conversation

@MikeMcQuaid
Copy link
Member

@MikeMcQuaid MikeMcQuaid commented Sep 17, 2016

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew tests with your changes locally?

Too many users are in an intermediate state otherwise which cannot be resolved. Read the old symlinks and migrate them across rather than assuming a unlink/link will work fine (as users have conflicts.)

References #991
Fixes Homebrew/homebrew-core#4926
Fixes #994

CC @zmwangx @ilovezfs @UniqMartin

@BrewTestBot BrewTestBot added the in progress Maintainers are working on this label Sep 17, 2016
Read the old symlinks and migrate them across rather than assuming a
unlink/link will work fine (as users have conflicts.)
pin = FormulaPin.new(formula)
pin.unpin
pin.pin_at(pin_version)
legacy_pinned_kegs.children.each do |link|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feature inparity in this block?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot recover if this symlink is corrupted.

@MikeMcQuaid MikeMcQuaid changed the title utils: unlink and relink all legacy LinkedKegs. Improve legacy symlink migration. Sep 17, 2016
@MikeMcQuaid MikeMcQuaid merged commit 5b8329b into Homebrew:master Sep 17, 2016
@MikeMcQuaid MikeMcQuaid deleted the migrate-legacy-symlinks-harder branch September 17, 2016 17:58
@BrewTestBot BrewTestBot removed the in progress Maintainers are working on this label Sep 17, 2016
@Homebrew Homebrew locked and limited conversation to collaborators May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error: No such file or directory - /usr/local/Cellar/node/6.3.1 Homebrew seriously broken (macos Sierra, maybe others too)

3 participants