Rules for Version Processing

Here are the proposed rules for version processing and a few examples:

  • The major number (a string) is mandatory
  • The age is optional and puts no constraint on the version part
  • The version part is hierarchical starting from the major version (we can get a major and minor, without the revision bit)

The format is as follows: < major >[.< minor >[.< revision >]][-< age >]

Good examples:

  • 1.2.3-4
  • 1.2-4
  • 1-4
  • 1
  • 1.2
  • 1.2.3
  • a.b.c-d

Bad examples:

  • .2 # missing major version
  • 1..3 # missing minor version where revision is defined
  • 1.2.-4 # missing revision - in this case the right value would be 1.2-4

Further constraints:

  • major and minor cannot contain the dot (".") character
  • elements can be a mix of numbers and letters, although having non-numerical major version is highly non-standard (but we cannot force everybody to follow our rules, therefore we should be ready to process that as well)
  • some other characters are illegal (slashes for example)
  • the general processing rules are as follows:
    1. split at the last dash (or last underscore on Debian) to separate version and age (age is optional)
    2. split at the first dot the get major
    3. split at the second dot the get minor
    4. everything else is revision
  • sorting is done in numerical order if the elements are numerical, in alphabetical order if they contain letters
  • if an element starts with a numerical part followed by letters, the sorting is done first sorting the numerical part, then the alpha part (e.g. 1.2.3a > 1.2.2b, 1.2.3a < 1.2.4, 1.2.3a < 1.2.3b, etc)


-- MebSter - 29 Oct 2007

Modified the format following Lorenzo's remark. Added further details from Alberto.

-- MebSter - 30 Oct 2007

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r3 - 2007-10-30 - MebSter
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    ETICS All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback