Re: dpkg's version comparison algorithm?
On Fri, 9 Jan 1998, David Frey wrote:
: Hello collegues,
:
: I don't understand dpkg's version compare algorithm: (david@eos)
: /var/debian/unstable/binary-i386/math$dpkg --compare-versions 1.15 lt
: 1.2-1; echo $? 1 (david@eos)
: /var/debian/unstable/binary-i386/math$dpkg --compare-versions 1.15 lt
: 1.20-1; echo $? 0 (david@eos)
: /var/debian/unstable/binary-i386/math$dpkg --version Debian Linux
: `dpkg' package management program version 1.4.0.19 (i386 elf).
: Copyright 1994-1996 Ian Jackson, Bruce Perens. This is free software;
: see the GNU General Public Licence version 2 or later for copying
: conditions. There is NO warranty. See dpkg --licence for details.
: (david@eos) /var/debian/unstable/binary-i386/math$
:
: Why is 1.15 > 1.2 ? Is it necessary to fill in trailing zeroes?
Well, think of it this way: which is greater, 2 or 15? (The "." is a
delimiter, not a decimal placeloder)
Think of kernel version numbers and this will start to make sense.
Kernel 2.0.4 is not newer than 2.0.32.
:
: David
: --
: David Frey (51F35923114FC864 7D05FF173C61EFDE)
: Those who do not understand Unix are condemned to reinvent it, poorly.
: -- Henry Spencer
:
--
Nathan Norman
MidcoNet - 410 South Phillips Avenue - Sioux Falls, SD 57104
phone: (605) 334-4454 fax: (605) 335-1173
mailto://finn@midco.net http://www.midco.net
PGP Key ID: 0xA33B86E9 - Public key available at keyservers
PGP Key fingerprint: CE03 10AF 3281 1858 9D32 C2AB 936D C472
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: