dev-cmd/unbottled: fix arch requirement handling

This commit is contained in:
Bo Anderson 2021-05-31 15:24:20 +01:00
parent 5115cc25fa
commit 984226d5b5
No known key found for this signature in database
GPG Key ID: 3DB94E204E137D65

View File

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