Merge pull request #11470 from Bo98/unbottled-arch

dev-cmd/unbottled: fix arch requirement handling
This commit is contained in:
Bo Anderson 2021-06-09 14:01:06 +01:00 committed by GitHub
commit 9938621f23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -158,10 +158,6 @@ module Homebrew
formulae.each do |f|
name = f.name.downcase
if f.bottle_specification.tag?(@bottle_tag, no_older_versions: true)
puts "#{Tty.bold}#{Tty.green}#{name}#{Tty.reset}: already bottled" if any_named_args
next
end
if f.disabled?
puts "#{Tty.bold}#{Tty.green}#{name}#{Tty.reset}: formula disabled" if any_named_args
@ -190,11 +186,7 @@ module Homebrew
Version.new(MacOS::Xcode.latest_version(macos: macos_version)) >= r.version
when ArchRequirement
arch = r.arch
arch = :intel if arch == :x86_64
arch = :arm64 if arch == :arm
arch == macos_version.arch
r.arch == @bottle_tag.arch
else
true
end
@ -215,6 +207,11 @@ module Homebrew
next
end
if f.bottle_specification.tag?(@bottle_tag, no_older_versions: true)
puts "#{Tty.bold}#{Tty.green}#{name}#{Tty.reset}: already bottled" if any_named_args
next
end
deps = Array(deps_hash[f.name]).reject do |dep|
dep.bottle_specification.tag?(@bottle_tag, no_older_versions: true) || dep.bottle_unneeded?
end