On Tuesday 11 November 2008, NewDeb <ace_shikha@hotmail.com> wrote about 'dpkg compare version bug ??': >When I try to compare 3.102 to 3.34, I get an incorrect answer as > follows. dpkg --compare-versions 3.102 ge 3.34; echo $? >0 dpkg's thinking: 3 > 3? false. 3 = 3? true. "." > "."? false. "." = "."? true. 102 > 34? true. Therefore, debian-version(3.102) > debian-version(3.34) >However, if I specify 3.34 as 3.340, I get the correct answer as follows: >dpkg --compare-versions 3.102 ge 3.340; echo $? >1 dpkg's thinking: 3 > 3? false. 3 = 3? true. "." > "."? false. "." = "." true. 102 > 340? false. 102 = 340? false. Therefore debian-version(3.102) < debian-version(3.340). >Is this a bug ? Not a bug. Non-numeric portions of the debian version are compared lexicographically, but numeric portions are compared numerically. This is intentional, as that's how most project's version work. E.g. Gnome 2.10 was after Gnome 2.8 and KDE 3.5.10 was after KDE 3.5.5. -- Boyd Stephen Smith Jr. ,= ,-_-. =. bss03@volumehost.net ((_/)o o(\_)) ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' http://iguanasuicide.org/ \_/
Attachment:
signature.asc
Description: This is a digitally signed message part.