From a716a45b198d57f456a016acc418bc0e41cd7559 Mon Sep 17 00:00:00 2001 From: Faye Date: Mon, 21 Feb 2022 16:26:23 -0500 Subject: [PATCH] linux-rt: Fix incorrect sorting of kernel version numbers when determining latest version When determining the latest linux-rt kernel version to update to, the list of filenames that `update-rt.sh` fetches from upstream is sorted lexicographically, while `update-rt.sh` assumes it's sorted in version order. As a result, for example, 5.10.78 is considered newer than 5.10.100. This change applies `sort --version-sort` to the extracted version numbers to properly identify the latest version. --- pkgs/os-specific/linux/kernel/update-rt.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/os-specific/linux/kernel/update-rt.sh b/pkgs/os-specific/linux/kernel/update-rt.sh index ccb017933420..a9e0577fae92 100755 --- a/pkgs/os-specific/linux/kernel/update-rt.sh +++ b/pkgs/os-specific/linux/kernel/update-rt.sh @@ -38,6 +38,7 @@ latest-rt-version() { curl -sL "$mirror/projects/rt/$branch/sha256sums.asc" | sed -ne '/.patch.xz/ { s/.*patch-\(.*\).patch.xz/\1/p}' | grep -v '\-rc' | + sort --version-sort | tail -n 1 }