From e18027a1a8406f97c3a3db8946817635eec6808d Mon Sep 17 00:00:00 2001 From: Shaun Jackman Date: Wed, 8 Jul 2020 09:41:12 -0700 Subject: [PATCH 1/2] Utils::Bottles::tag: ARM tag is arm_big_sur --- Library/Homebrew/extend/os/mac/utils/bottles.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/extend/os/mac/utils/bottles.rb b/Library/Homebrew/extend/os/mac/utils/bottles.rb index 99a22c3513777..37d34eadb2cb1 100644 --- a/Library/Homebrew/extend/os/mac/utils/bottles.rb +++ b/Library/Homebrew/extend/os/mac/utils/bottles.rb @@ -6,9 +6,11 @@ class << self undef tag def tag - tag = MacOS.version.to_sym - tag = "#{tag}_arm".to_sym if Hardware::CPU.arm? - tag + if Hardware::CPU.intel? + MacOS.version.to_sym + else + "#{ENV["HOMEBREW_PROCESSOR"]}_#{MacOS.version.to_sym}".to_sym + end end end From 9a83e52ae479607084c6df198ec21a93d371cb7b Mon Sep 17 00:00:00 2001 From: Shaun Jackman Date: Wed, 8 Jul 2020 12:30:45 -0700 Subject: [PATCH 2/2] HOMEBREW_PROCESSOR is arm64 on Apple Silicon Utils::Bottles::tag: ARM tag is arm64_big_sur --- Library/Homebrew/brew.sh | 6 ++---- Library/Homebrew/extend/os/mac/utils/bottles.rb | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh index c2f02d431697a..64eb881fd92e2 100644 --- a/Library/Homebrew/brew.sh +++ b/Library/Homebrew/brew.sh @@ -87,6 +87,7 @@ then odie "Cowardly refusing to continue at this prefix: $HOMEBREW_PREFIX" fi +HOMEBREW_PROCESSOR="$(uname -m)" HOMEBREW_SYSTEM="$(uname -s)" case "$HOMEBREW_SYSTEM" in Darwin) HOMEBREW_MACOS="1" ;; @@ -119,11 +120,9 @@ fi if [[ -n "$HOMEBREW_MACOS" ]] then - HOMEBREW_PROCESSOR="$(uname -p)" HOMEBREW_PRODUCT="Homebrew" HOMEBREW_SYSTEM="Macintosh" - # This is i386 even on x86_64 machines - [[ "$HOMEBREW_PROCESSOR" = "i386" ]] && HOMEBREW_PROCESSOR="Intel" + [[ "$HOMEBREW_PROCESSOR" = "x86_64" ]] && HOMEBREW_PROCESSOR="Intel" HOMEBREW_MACOS_VERSION="$(/usr/bin/sw_vers -productVersion)" HOMEBREW_OS_VERSION="macOS $HOMEBREW_MACOS_VERSION" # Don't change this from Mac OS X to match what macOS itself does in Safari on 10.12 @@ -166,7 +165,6 @@ then HOMEBREW_MACOS_SYSTEM_RUBY_NEW_ENOUGH="1" fi else - HOMEBREW_PROCESSOR="$(uname -m)" HOMEBREW_PRODUCT="${HOMEBREW_SYSTEM}brew" [[ -n "$HOMEBREW_LINUX" ]] && HOMEBREW_OS_VERSION="$(lsb_release -sd 2>/dev/null)" : "${HOMEBREW_OS_VERSION:=$(uname -r)}" diff --git a/Library/Homebrew/extend/os/mac/utils/bottles.rb b/Library/Homebrew/extend/os/mac/utils/bottles.rb index 37d34eadb2cb1..4b938678872db 100644 --- a/Library/Homebrew/extend/os/mac/utils/bottles.rb +++ b/Library/Homebrew/extend/os/mac/utils/bottles.rb @@ -9,7 +9,7 @@ def tag if Hardware::CPU.intel? MacOS.version.to_sym else - "#{ENV["HOMEBREW_PROCESSOR"]}_#{MacOS.version.to_sym}".to_sym + "#{Hardware::CPU.arch}_#{MacOS.version.to_sym}".to_sym end end end