9.2. Package Versions

Versions are objects that contain three main elements: a major number, a minor number, and a patch level. Versions have a textual representation and a pathname representation. The textual representation is usually

  major.minor.patchlevel      example:  2.6.1 
 


the pathname represenation is

  major_minor_patchlevel      example:  2_6_1


If there are no further qualifications of a version, it is considered to be a release version. Other kinds of version may be alpha, beta, gamma, and devel. The representation of these kinds adds a leading character to the version string, for example

  a4.4.2 = alpha 4.4.2, d3.1.4 = development version 3.1.4


Versions can be compared for equality, they are completely ordered by the relation less(v1, v2). The ordering concerning the numerical values is obvious; for versions of different kind hold the following rules:

  less(alpha-version, beta-version)
  less(beta-version, gamma-version)
  less(gamma-version, release-version) 
 


Of course the relation less is transitive.