Keg: fix alias and versioned symlink handling.#10327
Merged
MikeMcQuaid merged 2 commits intoHomebrew:masterfrom Jan 14, 2021
MikeMcQuaid:keg-fix-alias-handling
Merged
Keg: fix alias and versioned symlink handling.#10327MikeMcQuaid merged 2 commits intoHomebrew:masterfrom MikeMcQuaid:keg-fix-alias-handling
MikeMcQuaid merged 2 commits intoHomebrew:masterfrom
MikeMcQuaid:keg-fix-alias-handling
Conversation
Previously, `brew upgrade gcc@10` could get overzealous and remove the `LinkedKeg` record for `gcc@9`. This is bad because we then think `gcc@9` is unlinked when it is not and it causes a tonne of conflicts when trying to link `gcc@9` again. Instead, fix up the alias and versioned alias cleanup to be more precise and only delete the symlinks that point to the current `rack`, `opt_record` or `linked_keg_record` and unify the logic so it's performed consistently. While we're here: - don't `remove_old_aliases` every time we try to unlink a directory but just perform it once per `unlink` operation - remove the linked keg record on `uninstall`
Contributor
|
Review period will end on 2021-01-15 at 16:04:10 UTC. |
Contributor
|
Review period skipped due to |
BrewTestBot
approved these changes
Jan 14, 2021
mistydemeo
approved these changes
Jan 14, 2021
mgeplf
added a commit
to BlueBrain/libsonata
that referenced
this pull request
Feb 1, 2021
* the HDF5 bottle uses gcc10; https://formulae.brew.sh/formula/hdf5 so we are hit by this: Homebrew/homebrew-core#68866 sadly, it seems Homebrew/brew#10327 doesn't fix it, so we unlink old gcc's manually
mgeplf
added a commit
to BlueBrain/libsonata
that referenced
this pull request
Feb 2, 2021
* the HDF5 bottle uses gcc10; https://formulae.brew.sh/formula/hdf5 so we are hit by this: Homebrew/homebrew-core#68866 sadly, it seems Homebrew/brew#10327 doesn't fix it, so we unlink old gcc's manually
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Previously,
brew upgrade gcc@10could get overzealous and remove theLinkedKegrecord forgcc@9. This is bad because we then thinkgcc@9is unlinked when it is not and it causes a tonne of conflicts when trying to linkgcc@9again.Instead, fix up the alias and versioned alias cleanup to be more precise and only delete the symlinks that point to the current
rack,opt_recordorlinked_keg_recordand unify the logic so it's performed consistently.While we're here:
remove_old_aliasesevery time we try to unlink a directory but just perform it once perunlinkoperationuninstallFixes Homebrew/homebrew-core#68866
Replaces #10312