kumquat-buildroot/support
Sen Hastings ce7363524c support/scripts/pkg-stats: fix/improve git hash sorting
sortGrid()'s handling of git hashes and other large hex numbers
has been inconsistent, they can be detected as strings or numbers
depending on what type of character they start with.
This patch fixes the behaviour by using a regex to capture everything
that looks like a big hex number and treat it as a string.
This means when you sort by current version ascending all the version
strings with big hex numbers should show up first, sorted 0-9,a-f.

First we check for a string length >= 39, and then apply a regex
to return an array with every char from that string that matched
the regex. If the length of this array is still >= 39 we can assume
we are looking at something containing a git hash.

The reason why the length is defined as ">= 39" and not "40" or
"39 or 40" is twofold:

Firstly, 39 was chosen as a minimum to match stuff with 39 char git
hashes, like the rockchip-mali package.

Secondly, there is no max because we actually want to catch not
just explicitly git hashes, but any verson string with big gnarly
hex numbers in it.
Stuff like: "1.4.2-168-ged3039cdbeeb28fc0011c3585d8f7dfb91038292"

Why? Well, the idea is less about git hashes and sorting
and more about grouping similarly formatted version strings.

It would be impossble (or at least annoyingly complicated) and of
dubious utility to get a real sequential sort out of the
current version column, so the attempt here is to at the very
least collect all the similarly formatted things together.

This isn't perfect, but it's a (arguably) more useful sorted
output than before.

A demo is available here:
https://sen-h.codeberg.page/pkg-stats-demos/@pages/fix-improve-git-hash-sorting.html

Signed-off-by: Sen Hastings <sen@hastings.org>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2024-04-07 18:04:44 +02:00
..
config-fragments toolchain: drop codesourcery arm/aarch64 toolchains 2024-03-14 19:47:51 +01:00
dependencies support/dependencies/dependencies.sh: libopenssl needs perl bigint on s390x 2024-03-03 13:13:40 +01:00
docker support/docker: add qemu-system-misc for riscv runtime tests 2023-08-24 23:20:26 +02:00
download support/download/check-hash: fix shellcheck errors 2024-04-01 17:03:17 +02:00
gnuconfig
kconfig
legal-info
libtool
misc Update for 2024.02.1 2024-03-26 11:41:45 +01:00
scripts support/scripts/pkg-stats: fix/improve git hash sorting 2024-04-07 18:04:44 +02:00
testing toolchain/toolchain-external/toolchain-external-bootlin: bump to 2024.02 2024-04-07 17:28:56 +02:00