Package: u-boot-menu
Version: 1
Tags: patch
Severity: normal

When using u-boot-menu to sort kernel versions, it incorrectly
prioritized the vmlinuz-4.11.0-trunk-arm64 over vmlinuz-4.11.0-1-arm64.

The attached patch uses linux-version from linux-base to fix this, which
has sorting logic that should at least be internally consistant.

live well,
  vagrant

From 31065e6867ac296b2a77bf44088b6798a24b249a Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@debian.org>
Date: Sun, 25 Jun 2017 12:51:40 -0700
Subject: [PATCH] Use linux-version to list and sort the available versions
 correctly.

---
 u-boot-update | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/u-boot-update b/u-boot-update
index e671c61..ed0ff46 100755
--- a/u-boot-update
+++ b/u-boot-update
@@ -131,7 +131,7 @@ timeout ${U_BOOT_TIMEOUT}
 "
 
 # Find linux versions
-_VERSIONS="$(cd /boot && ls vmlinuz-* | grep -v .dpkg-tmp | sed -e 's|vmlinuz-||g' | sort -Vr)"
+_VERSIONS="$(linux-version list | linux-version sort --reverse)"
 
 if [ "$(stat --printf %d /)" = "$(stat --printf %d /boot)" ]
 then
-- 
2.11.0

Attachment: signature.asc
Description: PGP signature

Reply via email to