software_spec: make bottle sorting stable.

As `:arm64_big_sur` and `:big_sur` equated to the same version: their
sorting was not consistent. Instead, suffix the tag and use that for
sorting so `:big_sur` is always before `:arm64_big_sur`.
This commit is contained in:
Mike McQuaid 2020-12-07 15:43:44 +00:00
parent 3aeaf51538
commit a5bd7cccf1
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -392,10 +392,9 @@ class BottleSpecification
def checksums
tags = collector.keys.sort_by do |tag|
# Sort non-MacOS tags below MacOS tags.
OS::Mac::Version.from_symbol tag
"#{OS::Mac::Version.from_symbol(tag)}_#{tag}"
rescue MacOSVersionError
# Sort non-MacOS tags below MacOS tags.
"0.#{tag}"
end
checksums = {}