Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#60830 - [zeitgeist] gnome ecosystem: Git package versioning is poorly thought out and breaks vercmp

Attached to Project: Arch Linux
Opened by Mantas Mikulėnas (grawity) - Friday, 16 November 2018, 19:59 GMT
Last edited by Eli Schwartz (eschwartz) - Tuesday, 18 December 2018, 16:23 GMT
Task Type General Gripe
Category Packages: Extra
Status Assigned
Assigned To Jan de Groot (JGC)
Jan Alexander Steffens (heftig)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 4
Private No

Details

The problem with just doing the simple s/-/+/g is that vercmp treats + identically to . and therefore the resulting version number is 'newer' than actual point releases:

"warning: zeitgeist: local (1.0+1+g1bcc8585-2) is newer than extra (1.0.1-1)"

Adding some letters would avoid this problem (unless you like bumping epoch every time this happens). My favourite is:

pkgver() { cd $pkgname; git describe --tags | sed 's/-/.r/; s/-/./g'; }

This would result in 1.0.r1.g1bcc8585-2, which correctly compares as 'older' than 1.0.1-1 (and I like the dots, but it works equally well with +'s).
This task depends upon

Comment by Eli Schwartz (eschwartz) - Friday, 16 November 2018, 20:04 GMT
$ vercmp 1.0+1+g1bcc8585-2 1.0.1.g1bcc8585-2
0

Also see https://bbs.archlinux.org/viewtopic.php?id=241987

The entire gnome stack really needs this change.

The AUR has had guidelines which describe using the "r", and recommend using a dot over a plus, since makepkg originally got native support for -git packages.
https://wiki.archlinux.org/index.php/VCS_package_guidelines#Git

It's been fairly well tested, since -git packages actually hit this sort of issue all the time.

Loading...