Bug#493389: update-grub: uses wrong ordering algorithm (sorts 1.2.3-foo before 1.2.3.1-foo)
Felix Zielcke
fzielcke at z-51.de
Thu Aug 7 13:54:49 UTC 2008
Am Dienstag, den 05.08.2008, 21:40 +0200 schrieb Felix Zielcke:
> The grub2 packages have only one update-grub the one in /usr/sbin
> Ok and a update-grub2 which exec's update-grub but it's in /usr/sbin
> too.
Probable wasn't that clear so another try:
By switching to grub2 as default, there will be no more a update-grub
thingy in /sbin
I doubt we change something with that /sbin thingy on grub-legacy.
But luckly this is not the point of this bug report :)
> > If I have some time, I will prepare the patch. But please don't wait on me
> > for it, if someone else has the time to prepare the patch, please do so.
> That's very kind of you, I looked shortly at the comparison code and
> couldn't figure out how to change it so it uses the dpkg code for it :)
> Luckly grub2's update-grub uses now the comparison code of grub-legacy
> so it's not that hard to apply it then to both.
Seems like I think even for bash scripts too complicated
Just replace the CompareVersion function with this:
CompareVersions()
{
dpkg --compare-versions "$1" le "$2"
echo $?
}
update-grub shows me this with my debian sid 2.6.26 kernel and files
with names you reported this bug with:
Found kernel: /boot/vmlinuz-2.6.26-1-amd64
Found kernel: /boot/vmlinuz-2.6.25.14.1-t43
Found kernel: /boot/vmlinuz-2.6.25.14-t43
Found kernel: /boot/vmlinuz-2.6.25.13-t43
Found kernel: /boot/vmlinuz-2.6.25.12-t43
I was about unsure if I should use 'lt' 'le' 'le-nl' or 'lt-nl'
I try to find this now out, but please reply what you think is the best
we should use.
As you can see above it's very easy to test this :)
More information about the Pkg-grub-devel
mailing list