On 11/12/19 11:13 PM, Jan Engelhardt wrote:
On Tuesday 2019-11-12 12:25, Michal Rostecki wrote:
On Tue, Nov 12, 2019 at 08:30:40AM +0100, Jiri Slaby wrote:
Actually it is. The "~" convention originates in Debian and is used to denote pre-releases. So you can have v1.4 and during development v1.5~rc1, v1.5~rc2 etc which are newer than v1.4 but will be considered older when v1.5 final is released.
Right, that's why we use dot or plus: $ zypper versioncmp 1.15.0 1.15.0~20191108 1.15.0 is newer than 1.15.0~20191108 $ zypper versioncmp 1.15.0 1.15.0.20191108 1.15.0 is older than 1.15.0.20191108 $ zypper versioncmp 1.15.0 1.15.0+20191108 1.15.0 is older than 1.15.0+20191108
Exactly. And I thought that the standard way of versioning software built from unreleased git snapshoits is %PARENT_TAG%+git.%cd. Or eventually just %cd if the project does not have any tags and releases.
Worry not, even that case is covered: use 0~%cd. This practically sorts before anything else. (The only way upstream could break it is by making a really nondescript release number like 0~0 itself. But if they are smart, they will use 0~beta1/0~rc1 at the very least and all is well.)
Yeah I have upstreams who tag there pre releases with 1.15.0-alpha1 so you end up with 1.14.99 -> 1.15.0-alpha1 -> 1.15.0 which makes it impossible to use tags, so I have to change that part manually every release. -- Simon Lees (Simotek) http://simotek.net Emergency Update Team keybase.io/simotek SUSE Linux Adelaide Australia, UTC+10:30 GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B