7

Reading the changelog of the debian openjdk-8 source package we see that there is a version called openjdk-8 (8u45-b14-4) and the next one is openjdk-8 (8u60~b22-1).

What is the meaning of the tilde in this last version?

10

The official reference for the Debian package version format is in the Debian Policy Manual. The format is designed to allow “reasonable-looking” version numbers with a well-defined (if somewhat complex) comparison relation to decide when a version is more recent than another.

For the most part, the comparison is a lexicographic comparison of the string. For example, 1foo is sorted before 1ga. However, sequences of digits are compared in numerical order, so foo10bar is sorted after foo9bar.

With a lexicographic order, a string is always sorted before its prefix. The tilde character allows a deviation from that: foo~bar is always sorted before foo as well as before any version that begins with foo followed by a character other than ~. This is often used for beta versions: 8u60~b22 is sorted before 8u60. I don't know why the OpenJDK 8 packages seem to alternate between -b and ~b suffixes though.

Tilde suffixes are also used for backports of all kinds. For example, if the same version of a package is present in both Debian stable and testing, and a security fix needs to enter stable, then the package in stable will have a suffix like -2~deb1 while the version in testing (compiled against more recent libraries) will have -2; that way the package is an upgrade to the -1 version, but if a system is upgraded from stable to testing, the -2~deb1 stable version will be upgraded to the -2 testing version. Official backports use ~bpoNUMBER for the same purpose, this way a 4.2~bpo7 version will be upgraded to 4.2 if that ever appears in the main distribution.

  • Ok for the meaning, but, in this case, what is the reason of the tilde? – Ortomala Lokni Sep 20 '15 at 20:43
  • @OrtomalaLokni I guess they needed a character that wasn't usually present in version numbers (so punctuation, and not . or - or +), that wasn't a shell special character (in most circumstances), and that was allowed in Windows file names, and that was vaguely space-like in appearance. – Gilles Sep 20 '15 at 20:48
  • 1
    It's not just used for backports, but also for things like release candidates: 1.0~rc1-1 < 1.0-1 -- this can be used for an upload to experimental – Wouter Verhelst Sep 20 '15 at 22:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.