Detect half-baked core taps that show up on a fairly regular basis (e.g. #11465).
The logic is simple enough: Since an improper tap wouldn't have a complete Git config, and is always somewhere below `HOMEBREW_REPOSITORY`, any Git operation would look at the Brew repo instead. We simply need to test for any of:
1. Empty tap origin
2. Empty tap HEAD
3. Tap HEAD == Brew HEAD
If you can write to `HOMEBREW_PREFIX` (which isn't the case for
`/usr/local` on newer macOSs) then don't complain about these
directories not existing.
- Output `brew doctor` and `brew install` messages noting this configuration is (currently) unsupported and encourage use of Rosetta instead
- Output Rosetta 2 usage in `brew config` on ARM (whether in Rosetta 2 or not)
- Check the architecture of (newly installed) dependencies and ensure they are using the correct architecture.
- Don't allow installing macOS Intel Homebrew in macOS ARM Homebrew default prefix (and vice versa
- Actually write out the architecture of dependencies to the tab rather than generating and throwing them away
- Set and document the expected default prefix for macOS Intel Homebrew, macOS ARM Homebrew (`/opt/homebrew`) and Homebrew on Linux
While we're here:
- Don't say Big Sur is a prerelease version but still make it clear we
don't support it (yet).
- Don't reference non-existent IRC channel
Also look in Homebrew/homebrew-core for uncommitted files (in some ways
we care about uncommitted stuff there more than Homebrew/brew). Also,
list all the modified files even when on non-CI to make it easier for
users to figure out their own issues and check the contents of the
whole repos rather than just a subdirectory.
In general this is a cleanup that should have been done long ago (when
we split Homebrew/brew and Homebrew/homebrew-core).