[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Is 1-0 equal to 1 as a version?

$ python -c 'import apt_pkg; apt_pkg.init(); print apt_pkg.VersionCompare("1", "1-0")'
$ dpkg --compare-versions '1' = '1-0'; echo $?

I think dpkg is right because policy says:

| The absence of a <debian_revision> is equivalent to a
| <debian_revision> of `0'.

So this looks like a bug in APT.  But I think that in practice, the
APT algorithm is the dominant one, so it might make sense to update
policy and dpkg instead.

Reply to: