Changes between Version 1 and Version 2 of WhenToUseTheStupidTildeInVersionNumbers
- Timestamp:
- 03/12/11 20:30:25 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WhenToUseTheStupidTildeInVersionNumbers
v1 v2 3 3 According to [http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version Debian Policy]: 4 4 5 The lexical comparison is a comparison of ASCII values modified so that all the letters sort earlier than all the non-letters and so that a tilde sorts before anything, even the end of a part. For example, the following parts are in sorted order from earliest to latest: ~~, ~~a, ~, the empty part, a.[[BR]]5 The lexical comparison is a comparison of ASCII values modified so that all the letters sort earlier than all the non-letters and so that a tilde sorts before anything, even the end of a part. For example, the following parts are in sorted order from earliest to latest: `~~`, `~~a`, `~`, the empty part, `a`.[[BR]] 6 6 ...[[BR]] 7 One common use of ~ is for upstream pre-releases. For example, 1.0~beta1~svn1245 sorts earlier than 1.0~beta1, which sorts earlier than 1.0.7 One common use of `~` is for upstream pre-releases. For example, `1.0~beta1~svn1245` sorts earlier than `1.0~beta1`, which sorts earlier than `1.0`. 8 8 9 9 A good rule of thumb is that the tilde is generally needed for '''earlier''' (`<<`, `lt`) and '''later-or-equal''' (`>=`, `ge`) comparisons, and not needed for '''later''' (`>>`, `gt`) or '''earlier-or-equal''' (`<=`, `le`).