Merge branch 'master' into add-common-curl-connectivity-issues-doc
This commit is contained in:
commit
067c4252cc
@ -20,7 +20,7 @@ RUN touch /var/mail/ubuntu && chown ubuntu /var/mail/ubuntu && userdel -r ubuntu
|
|||||||
# shellcheck disable=SC1091,SC2154,SC2292
|
# shellcheck disable=SC1091,SC2154,SC2292
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends software-properties-common gnupg-agent \
|
&& apt-get install -y --no-install-recommends software-properties-common gnupg-agent \
|
||||||
&& add-apt-repository -y ppa:git-core/ppa \
|
&& if [ "$(uname -m)" != aarch64 ]; then add-apt-repository -y ppa:git-core/ppa; fi \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
acl \
|
acl \
|
||||||
|
|||||||
@ -118,11 +118,12 @@ class BottleSpecification
|
|||||||
tags = collector.tags.sort_by do |tag|
|
tags = collector.tags.sort_by do |tag|
|
||||||
version = tag.to_macos_version
|
version = tag.to_macos_version
|
||||||
# Give `arm64` bottles a higher priority so they are first.
|
# Give `arm64` bottles a higher priority so they are first.
|
||||||
priority = (tag.arch == :arm64) ? 2 : 1
|
priority = (tag.arch == :arm64) ? 3 : 2
|
||||||
"#{priority}.#{version}_#{tag}"
|
"#{priority}.#{version}_#{tag}"
|
||||||
rescue MacOSVersion::Error
|
rescue MacOSVersion::Error
|
||||||
# Sort non-macOS tags below macOS tags.
|
# Sort non-macOS tags below macOS tags, and arm64 tags before other tags.
|
||||||
"0.#{tag}"
|
priority = (tag.arch == :arm64) ? 1 : 0
|
||||||
|
"#{priority}.#{tag}"
|
||||||
end
|
end
|
||||||
tags.reverse.map do |tag|
|
tags.reverse.map do |tag|
|
||||||
spec = collector.specification_for(tag)
|
spec = collector.specification_for(tag)
|
||||||
|
|||||||
@ -98,7 +98,7 @@ module Hardware
|
|||||||
when 0x11
|
when 0x11
|
||||||
:amd_k8_k10_hybrid
|
:amd_k8_k10_hybrid
|
||||||
when 0x12
|
when 0x12
|
||||||
:amd_k12
|
:amd_k10_llano
|
||||||
when 0x14
|
when 0x14
|
||||||
:bobcat
|
:bobcat
|
||||||
when 0x15
|
when 0x15
|
||||||
|
|||||||
@ -149,26 +149,35 @@ module RuboCop
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
arm64_nodes = []
|
arm64_macos_nodes = []
|
||||||
intel_nodes = []
|
intel_macos_nodes = []
|
||||||
|
arm64_linux_nodes = []
|
||||||
|
intel_linux_nodes = []
|
||||||
|
|
||||||
sha256_nodes.each do |node|
|
sha256_nodes.each do |node|
|
||||||
version = sha256_bottle_tag node
|
version = sha256_bottle_tag node
|
||||||
if version.to_s.start_with? "arm64"
|
if version == :arm64_linux
|
||||||
arm64_nodes << node
|
arm64_linux_nodes << node
|
||||||
|
elsif version.to_s.start_with?("arm64")
|
||||||
|
arm64_macos_nodes << node
|
||||||
|
elsif version.to_s.end_with?("_linux")
|
||||||
|
intel_linux_nodes << node
|
||||||
else
|
else
|
||||||
intel_nodes << node
|
intel_macos_nodes << node
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return if sha256_order(sha256_nodes) == sha256_order(arm64_nodes + intel_nodes)
|
sorted_nodes = arm64_macos_nodes + intel_macos_nodes + arm64_linux_nodes + intel_linux_nodes
|
||||||
|
return if sha256_order(sha256_nodes) == sha256_order(sorted_nodes)
|
||||||
|
|
||||||
offending_node(bottle_node)
|
offending_node(bottle_node)
|
||||||
problem "ARM bottles should be listed before Intel bottles" do |corrector|
|
problem "ARM bottles should be listed before Intel bottles" do |corrector|
|
||||||
lines = ["bottle do"]
|
lines = ["bottle do"]
|
||||||
lines += non_sha256_nodes.map { |node| " #{node.source}" }
|
lines += non_sha256_nodes.map { |node| " #{node.source}" }
|
||||||
lines += arm64_nodes.map { |node| " #{node.source}" }
|
lines += arm64_macos_nodes.map { |node| " #{node.source}" }
|
||||||
lines += intel_nodes.map { |node| " #{node.source}" }
|
lines += intel_macos_nodes.map { |node| " #{node.source}" }
|
||||||
|
lines += arm64_linux_nodes.map { |node| " #{node.source}" }
|
||||||
|
lines += intel_linux_nodes.map { |node| " #{node.source}" }
|
||||||
lines << " end"
|
lines << " end"
|
||||||
corrector.replace(bottle_node.source_range, lines.join("\n"))
|
corrector.replace(bottle_node.source_range, lines.join("\n"))
|
||||||
end
|
end
|
||||||
|
|||||||
@ -26,7 +26,7 @@ RSpec.describe Hardware::CPU do
|
|||||||
:amd_k8,
|
:amd_k8,
|
||||||
:amd_k8_k10_hybrid,
|
:amd_k8_k10_hybrid,
|
||||||
:amd_k10,
|
:amd_k10,
|
||||||
:amd_k12,
|
:amd_k10_llano,
|
||||||
:arm,
|
:arm,
|
||||||
:arm_blizzard_avalanche,
|
:arm_blizzard_avalanche,
|
||||||
:arm_brava,
|
:arm_brava,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user