Bug#494158: [grub2] update-grub: uses wrong ordering algorithm (sorts 1.2.3-foo before 1.2.3.1-foo)
Felix Zielcke
fzielcke at z-51.de
Fri Aug 8 11:21:35 UTC 2008
Am Freitag, den 08.08.2008, 13:06 +0200 schrieb Felix Zielcke:
>
> I couldn't figure out with playing with this ~ thingy how to tell dpkg that -rc1-git1 is higher then -rc1
>
> So it seems like dpkg --compare-versions isn't that perfect for official kernel.org patch numbering ;)
>
Ok I noticed I tested this wrong :(
fz:/boot# dpkg --compare-versions 2.6.26-1-amd64~rc1 gt 2.6.26-1-amd64~rc1~git1 ;echo $?
0
fz:/boot# dpkg --compare-versions 2.6.26-1-amd64~rc1 gt 2.6.26-1-amd64~rc1-git1 ;echo $?
1
So i think it works if there is only 1 ~ instead of 2
Unfortunately I'm not that good in regexp but I try to figure out how this can be done:
-git -> ~git
-rc -> ~rc
-rcN-git ~rcN-git
More information about the Pkg-grub-devel
mailing list