Go to file
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
arch arch: add support 16k page size on ARM64 2024-01-19 21:19:33 +01:00
board configs/qemu: update defconfigs to Linux 6.6.18 2024-04-07 16:49:43 +02:00
boot boot/uboot: add support for u-boot-initial-env install 2024-04-03 21:58:11 +02:00
configs configs/qemu: update defconfigs to Linux 6.6.18 2024-04-07 16:49:43 +02:00
docs docs/manual: fix host-python-setuptools typo 2024-04-03 21:53:41 +02:00
fs Add BR2_ROOTFS_{PRE_BUILD|POST_{BUILD|FAKEROOT|IMAGE}}_SCRIPT_ARGS 2024-03-28 21:47:04 +01:00
linux linux: bump latest version to 6.8 2024-03-24 19:18:46 +01:00
package package/tcf-agent: fix x86 build 2024-04-07 18:04:42 +02:00
support support/scripts/pkg-stats: fix/improve git hash sorting 2024-04-07 18:04:44 +02:00
system Add BR2_ROOTFS_{PRE_BUILD|POST_{BUILD|FAKEROOT|IMAGE}}_SCRIPT_ARGS 2024-03-28 21:47:04 +01:00
toolchain toolchain/toolchain-external/toolchain-external-bootlin: bump to 2024.02 2024-04-07 17:28:56 +02:00
utils utils/check-package: emit library name along with check function name 2024-04-01 20:52:26 +02:00
.checkpackageignore .checkpackageignore: regenerate for lvm2 patches 2024-04-02 22:09:27 +02:00
.clang-format .clang-format: initial import from Linux 5.15.6 2022-01-01 15:01:13 +01:00
.defconfig arch: remove support for sh64 2016-09-08 22:15:15 +02:00
.editorconfig editorconfig: fix wildcard expansion 2023-12-20 21:32:06 +01:00
.flake8 Revert ".flake8: fix check for 80/132 columns" 2021-01-02 17:38:20 +01:00
.gitignore
.gitlab-ci.yml support/misc/gitlab-ci.yml.in: retry a job only if it failed due to a runner issue 2023-08-27 10:09:37 +02:00
.shellcheckrc utils/check-package: improve shellcheck reproducibility 2022-07-25 23:52:47 +02:00
CHANGES Update for 2023.02.11 2024-03-27 10:33:36 +01:00
Config.in package/google-breakpad: needs C++17 2024-04-07 17:14:46 +02:00
Config.in.legacy package/flutter-gallery: drop package 2024-03-26 00:08:06 +01:00
COPYING
DEVELOPERS DEVELOPERS: remove Thomas De Schampheleire 2024-04-04 16:23:46 +02:00
Makefile Add BR2_ROOTFS_{PRE_BUILD|POST_{BUILD|FAKEROOT|IMAGE}}_SCRIPT_ARGS 2024-03-28 21:47:04 +01:00
Makefile.legacy Remove BR2_DEPRECATED 2016-10-15 23:14:45 +02:00
README docs: move the IRC channel away from Freenode 2021-05-29 22:16:23 +02:00

Buildroot is a simple, efficient and easy-to-use tool to generate embedded
Linux systems through cross-compilation.

The documentation can be found in docs/manual. You can generate a text
document with 'make manual-text' and read output/docs/manual/manual.text.
Online documentation can be found at http://buildroot.org/docs.html

To build and use the buildroot stuff, do the following:

1) run 'make menuconfig'
2) select the target architecture and the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) find the kernel, bootloader, root filesystem, etc. in output/images

You do not need to be root to build or run buildroot.  Have fun!

Buildroot comes with a basic configuration for a number of boards. Run
'make list-defconfigs' to view the list of provided configurations.

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org
You can also find us on #buildroot on OFTC IRC.

If you would like to contribute patches, please read
https://buildroot.org/manual.html#submitting-patches