4 Commits

Author SHA1 Message Date
Mike McQuaid
2b9edf72bc
unlink: unlink only keg-only versioned formulae.
As otherwise we unlink those that don't conflict e.g. `gcc@8` and
`gcc@9`.
2020-11-16 14:45:15 +00:00
Mike McQuaid
dcba99c7d1
Revert "Revert "Improve @-versioned formulae linking."" 2020-11-02 11:20:09 +00:00
Shaun Jackman
099af8cf9c
Revert "Improve @-versioned formulae linking." 2020-10-30 10:40:10 -07:00
Mike McQuaid
849034c368
Improve @-versioned formulae linking.
The way we currently handle @-versioned formulae linking is pretty
labourius:
- it requires extensive use of `link_overwrite` to avoid the `link`
  stage failing on certain install/upgrade scenarios
- we teach people to use `brew link --force` whenever they wish to
  link a versioned formulae when it's pretty obvious what's expected
  in that situation

Instead, let's:
- automatically unlink other versioned formulae when linking a
  versioned formula (either through `brew link` or `install`/`upgrade`
  /`reinstall`)
- notify the user what we've done (with the same messaging as if
  they had run `brew link` manually)
2020-10-29 13:35:03 +00:00