FixesHomebrew/homebrew#6065.
My pre-emptive fix that avoided calling Pathname.ensure_writable because I was not convinced it worked broke this function due to incorrect logic.
The lesson is, don’t write pre-emptive fixes. Wait until you've seen the bug first. All code has bugs in, so write less. I'm an idiot sometimes.
Also clean-up this external command in preparation
for becoming a built-in command.
Make which_versions available in Homebrew module so
that it can be used by other commands in the future.
FixesHomebrew/homebrew#2709.
By forcing dylibs to have an install_name id that is the HOMEBREW_PREFIX path, ie. the symlink’s path. Stuff that links to these dylibs will use this id and thus by immune to upgrades of underlying libraries.
Thus whatever keg is "current" ie. linked, will be the library that is used by the tool.
This fix is not retroactive. So there will still be breakage for existing installations of stuff.
The fix_install step in install is moved after the link step as the symlinking
is required to determine the eventual ids for each dylib.
Before we would always make the symlink itself have a basename the same as what it pointed to.
I don’t think this breaks any of the other usages as they were working by coincidence.
Behaviour for git checkout was changed such that the update would fail because it refused to checkout files on to existing files in the working directory.
This was bad behaviour anyway, we should make efforts to keep any local modifications to the Homebrew checkout. Everything is neatly resolved if we just do a --soft reset.
ClosesHomebrew/homebrew#6017.
This fixes reporting of which formulae changed in git versions where `pull`
output is not compatible.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>