FS#61058 - [syslinux] pkgver should reflect commits since 6.04.pre1

Attached to Project: Arch Linux
Opened by nl6720 (nl6720) - Thursday, 13 December 2018, 12:20 GMT
Last edited by Anatol Pomozov (anatolik) - Thursday, 10 January 2019, 17:30 GMT
Task Type General Gripe
Category Packages: Testing
Status Closed
Assigned To Tobias Powalowski (tpowa)
Anatol Pomozov (anatolik)
Architecture All
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
syslinux 6.04.alpha is not really syslinux 6.04.alpha (or syslinux 6.04.pre1), it's syslinux 6.04.pre1 + 41 commits on top.
Other packages (e.g. flatpak 1.1.1+3+g4111dbad-1, polkit 0.115+24+g5230646-1) list the commit and the commit count since the tag.

The syslinux pkgver then should be 6.04.pre1+41+g5e426532.

I think something like this in pkgver() should work:
git describe --long --tags | sed 's/^syslinux-//;s/-pre/.pre/;s/-/+/g'


Additional info:
* package version(s)
* config and/or log files etc.
syslinux 6.04.alpha-1


Steps to reproduce:
This task depends upon

Closed by  Anatol Pomozov (anatolik)
Thursday, 10 January 2019, 17:30 GMT
Reason for closing:  Fixed
Additional comments about closing:  syslinux-6.04.pre1.r41.g5e426532
Comment by Eli Schwartz (eschwartz) - Thursday, 13 December 2018, 13:55 GMT
The correct way to describe a pkgver from git is documented here: https://wiki.archlinux.org/index.php/VCS_package_guidelines#Git

The pkgver of every gnome package in the repositories including the two you pointed out, is badly broken; see  FS#60830  for more details.

This reinforces my belief that packaging from git master is a bad idea.
Comment by nl6720 (nl6720) - Thursday, 13 December 2018, 14:00 GMT
Are you talking about the "." vs "+" ?

The way I see it is, "+" is used when a specific commit is specified in the PKGBUILD and "." if it always builds from git HEAD (i.e. only AUR packages).
Comment by Eli Schwartz (eschwartz) - Thursday, 13 December 2018, 16:05 GMT
I'm talking about the missing "r" in the commit count.

The "." vs. "+" is only used depending on whether you follow the battle-tested guidelines from the AUR, or the much later (and broken with respect to commit count) established style of our gnome packages once they all made the shift to building from git instead of stable releases.
Comment by nl6720 (nl6720) - Thursday, 13 December 2018, 16:08 GMT
I'm too lazy to check, but I don't think I've ever seen an official package with an "r" before the commit count.
Comment by nl6720 (nl6720) - Thursday, 13 December 2018, 16:25 GMT
So the correct pkgver() should be:

git describe --long --tags | sed 's/^syslinux-//;s/-pre/.pre/;s/\([^-]*-g\)/r\1/;s/-/+/g'
Comment by Eli Schwartz (eschwartz) - Friday, 14 December 2018, 01:06 GMT
I know for absolute fact that when I package things, it has the "r" in it. More generally,

expac -S '%n %v' | awk '/ .*[.+]r.*/'

Loading...