Bug#568160: grub-common: wrongly sorts 2.6.32-trunk ahead of 2.6.32-1
Aaron M. Ucko
ucko at debian.org
Tue Feb 2 20:06:22 UTC 2010
Package: grub-common
Version: 1.98~20100128-1
Severity: normal
Tags: patch
In the rush to make official 2.6.32 kernel packages available in
Debian, the maintainers initially used image names of the form
vmlinuz-2.6.32-trunk-FLAVOR to indicate that they hadn't yet reached a
final -1 ABI. They now have, but grub's version comparison function
incorrectly treats the older -trunk packages as newer. (I'm not sure
why the maintainers chose -trunk rather than -0 or ~trunk, but what's
done is done.)
The good news is that the relevant shell function (version_test_gt
from grub-mkconfig_lib) already has a provision for sorting some
suffixes early, so I propose simply adjusting it to do the same for
-trunk:
--- /usr/lib/grub/grub-mkconfig_lib 2010-01-28 11:05:49.000000000 -0500
+++ /home/amu/tmp/grub-mkconfig_lib 2010-02-02 14:38:27.000000000 -0500
@@ -163,8 +163,9 @@
version_test_gt ()
{
- local a=`echo $1 | sed -e "s/[^-]*-//;s/[._-]\(pre\|rc\|test\|git\|old\)/~\1/g"`
- local b=`echo $2 | sed -e "s/[^-]*-//;s/[._-]\(pre\|rc\|test\|git\|old\)/~\1/g"`
+ local sedexp="s/[^-]*-//;s/[._-]\(pre\|rc\|test\|git\|old\|trunk\)/~\1/g"
+ local a=`echo $1 | sed -e "$sedexp"`
+ local b=`echo $2 | sed -e "$sedexp"`
local cmp=gt
if [ "x$b" = "x" ] ; then
return 0
Could you please do so?
Thanks!
P.S. I found #522194 when checking for duplicates, but I'm reporting
this issue separately, as I don't necessarily want kernels sorted by
mtime either. (Such a setup could interact poorly with security
updates to otherwise older kernels.) The fact that I only care
nowadays about the names official Debian kernels use should simplify
matters, though.
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages grub-common depends on:
ii base-files 5.1 Debian base system miscellaneous f
ii dpkg 1.15.5.6 Debian package management system
ii gettext-base 0.17-8 GNU Internationalization utilities
ii install-info 4.13a.dfsg.1-5 Manage installed documentation in
ii libc6 2.10.2-5 Embedded GNU C Library: Shared lib
ii libfreetype6 2.3.11-1 FreeType 2 font engine, shared lib
ii zlib1g 1:1.2.3.4.dfsg-3 compression library - runtime
Versions of packages grub-common recommends:
pn os-prober <none> (no description available)
Versions of packages grub-common suggests:
ii grub-emu 1.98~20100128-1 GRand Unified Bootloader, version
pn multiboot-doc <none> (no description available)
-- no debconf information
More information about the Pkg-grub-devel
mailing list