On 22/09/2021 04:30, Brian Inglis wrote:
On 2021-09-21 14:04, Jon Turney wrote:

Release numbers starting with 0 already have a defined meaning.

They are to be used for upstream pre-release versions

e.g pkg-1.0-0.1.g12345678 is a pre-release of pkg 1.0, since this sorts before pkg-1.0-1

See https://fedoraproject.org/wiki/Package_Versioning_Examples, included by reference in https://cygwin.com/packaging-package-files.html, for some more examples.

Thanks for that pointer and link, but the examples are simple with uniform version levels and random strings ordered using sequential prefixes.

The upstream bison test versions I was trying while working on some test config problems with bison 3.8/3.8.1 e.g.
bison-3.8.1.27-dd6e.tar.xz, bison-3.8.1.29-5c106.tar.xz should they be
3.8.1.27-0.1.dd6e, 3.8.1.29-0.1.5c106 or
3.8.1-0.27.dd6e, 3.8.1-0.29.5c106 or even
3.8.1-0.1.27.dd6e, 3.8.1-0.2.29.5c106 ?

Question is a little unclear, but I think the answer is you are looking for is that R should be something like '0.<serial|date>.<hash>'

For these multi-level versions, is ls -v or sort -V definitive for Cygwin versions, or some other sort?

https://cygwin.com/packaging-package-files.html also describes the ordering.

 Version and release sort according to the following rules:

    Contiguous chunks of digits or alphabetic characters are compared
    Non-alphanumeric separators for these contiguous chunks are ignored
    Alphabetic chunks sort before digit chunks
    Digit chunks sort numerically and alphabetic chunks sort lexicographically
    If all chunks are equal, the string with any suffix remaining is the greater

A package with a higher version is greater, regardless of the release. When two packages have an identical version, the one with the higher release is greater.

This is the ordering known as 'rpmvercmp'.

Reply via email to