How to decipher the package version numbers shown in DNF

I always compared the the versions I had with the versions of upgrades and simply took that the higher number is the better/newer and I think the majority does the same. I wonder, however, what these version numbers mean when separating. Taking the following line for instance:

kmod-nvidia-5.10.10-200.fc33.x86_64.x86_64   3:460.32.03-1.fc33   @@commandline

Concentrating on the version (β€œ3:460.32.03-1.fc33”) alone, I can create a schema and get x:yy.yy.yy-z.rel.

I can explain yy.yy.yy outright, which will be the version the package maintainer uses for their package. Likewise I can also see the meaning of rel, which is the release this package is meant for.

However, I still wonder what the number in front of the colon (β€œx:”) means as well as the one behind the hyphen (β€œ-z”). In most cases I see them only within the DNF environment and not when calling up the version of the resulting binaries (and yes, I am aware that package β‰  binary and that there may be slight differences).

This is especially puzzling since not all packages have the notation with a digit in front of a colon (all or most, however, use the hyphen notation in the back).

I think I even saw two different versions of the same package somewhere, where one had the colon-dot-dot(-dot)-hyphen notation and the other was without the colon, which made me believe that this number is not part of the actual version of the package, but is some sort of ID inside DNF for them.

Can somebody shed a light or point me to a resource where I can read up on it, please?

2 Likes

x: is called epoch and is used by some packages but not all. -z is called release and it is increased whenever a package is rebuild for the same version. You can read more here:

6 Likes

One additional point that can cause confusion: When a package doesn’t use the Epoch value, it is implicitly set to 0 (to make sure that any set Epoch value will always sort higher). Some dnf commands, notably repoquery, will always return the Epoch, even the implicit 0:

$ dnf list zsh
Installed Packages
zsh.x86_64                                             5.8-4.fc34                                             @rawhide
$ dnf repoquery --whatprovides zsh
zsh-0:5.8-4.fc34.x86_64

Those are the same packages.

2 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.