kumquat-buildroot/support/scripts
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
..
apply-patches.sh support/scripts/: remove -E flag from patch call 2022-01-03 21:14:32 +01:00
boot-qemu-image.py support/scripts/boot-qemu-image.py: increase the timeout by 10 2022-07-27 15:56:57 +02:00
br2-external br2-external: make version of external trees available 2023-05-13 12:06:08 +02:00
brpkgutil.py
check-bin-arch
check-dotconfig.py support: fix flake8 error E741 ambiguous variable name 2021-10-18 22:31:11 +02:00
check-host-rpath support/scripts: fix TABs/spaces in check-host-rpath 2022-07-30 18:15:08 +02:00
check-kernel-headers.sh
check-merged-usr.sh
cve.py support/scripts: use FKIE git tree 2024-03-20 21:06:42 +01:00
expunge-gconv-modules toolchain: support gconv modules from glibc >= 2.34 2022-10-21 21:02:40 +02:00
fix-configure-powerpc64.sh
fix-rpath support/scripts: fix fix-rpath 2023-08-07 23:20:31 +02:00
gen-bootlin-toolchains support/scripts/gen-bootlin-toolchains: generate BR2_ARCH_NEEDS_GCC_AT_LEAST_X guard 2023-08-13 18:04:47 +02:00
generate-gitlab-ci-yml support/misc/gitlab-ci.yml.in: pass emulator builtin binaries as artifacts 2023-07-18 23:03:23 +02:00
genimage.sh
graph-build-time support/scripts/graph-build-time: add support for timeline graphing 2022-03-20 23:52:24 +01:00
graph-depends
hardlink-or-copy
mkmakefile
mkusers support/scripts/mkusers: fix shellcheck errors 2024-04-01 17:03:12 +02:00
pkg-stats support/scripts/pkg-stats: fix/improve git hash sorting 2024-04-07 18:04:44 +02:00
pyinstaller.py package/pkg-python: clean conflicting pep517 packages before install 2022-08-22 11:54:25 +02:00
setlocalversion
size-stats support/scripts/size-stats: count compiled python (.pyc) files 2022-09-24 10:34:30 +02:00