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 Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:26 GMT
Opened by Mantas Mikulėnas (grawity) - Friday, 16 November 2018, 19:59 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:26 GMT
|
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
Closed by Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:26 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/zeitgeist/issues/1
Saturday, 25 November 2023, 20:26 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/zeitgeist/issues/1
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.