Merge pull request #11470 from Bo98/unbottled-arch
dev-cmd/unbottled: fix arch requirement handling
This commit is contained in:
		
						commit
						9938621f23
					
				@ -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
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user