This can be useful when testing fetch on a different processor than the
one the user is running on.
While we're here, refactor code run on `source` to need a function call
instead.
Whenever the `sysctl` call does not match `"Apple"*`, we can be sure
that `HOMEBREW_PROCESSOR` is `Intel`, so there's no need for this
additional check.
The previous commit only prevented the installation of an Intel Portable
Ruby into `/opt/homebrew` prefix. Let's actually install an ARM64
Portable Ruby there too.
Since `HOMEBREW_PROCESSOR` is populated using `uname -m`, this will
register as `Intel` even when a native ARM install is running under
Rosetta.
Let's work around this by checking `sysctl -n machdep.cpu.brand_string`.
On my Intel machine:
❯ sysctl -n machdep.cpu.brand_string
Intel(R) Core(TM) i3-1000NG4 CPU @ 1.10GHz
On Apple Silicon:
brew@HMBRW-A-001-M1-001 ~ % sysctl -n machdep.cpu.brand_string
Apple M1
The case of a Rosetta installation of Homebrew is already handled below
the proposed change.
FixesHomebrew/discussions#2434.
Remove all code related to Bintray. It no longer works so there's no
point keeping it around.
Some of this could arguably be deprecated/disabled first/instead but:
I'm not sure I see the sense in keeping stuff around that's known to be
broken.
A new version of `shellcheck` (I think?) brought us so new warnings and
errors.
To fix:
- pass `--source-path` so we don't need to stop `shellcheck` trying to
read sourced files every time
- disable some more warnings/errors we don't care about fixing
Now that all bottles (without existing `sha256` mismatches) have been
uploaded to GitHub Packages make it the default download location.
Will give this a few days testing before we make a tag and make this
default for everyone.
No migration has been done for Linuxbrew packages yet; those will be
done after we have fully migrated over Homebrew.
As-of https://github.com/Homebrew/homebrew-portable-ruby/pull/100 we've
removed ARM builds for Portable Ruby due to months of breakage.
Similarly, when we last bumped Portable Ruby the ARM build was much
delayed but, despite Homebrew/brew being completely unusable to anyone
using it on ARM in that case, no-one complained or filed issues.
Instead of attempting to maintain and update a Portable Ruby on niche
(Homebrew) platforms like ARM (or, in past/future PPC) improve the
messaging to provide users with a workaround.
Now we allow only a major/minor version match it should be pretty
doable for those users to install e.g. a prebuilt Ruby binary from a PPA
or built it from source if needed using `ruby-build` and `rbenv`.
The messaging could be improved further but we're somewhat limited by
`ruby.sh` and `vendor-install.sh` being separate. I'm tempted to combine
them (or at least have `vendor-install.sh` not be so generic as to not
be able to give Ruby-specific advice).