[aur-general] PKGBUILD review request
Levente Polyak
anthraxx at archlinux.org
Thu Feb 7 22:38:33 UTC 2019
Hey ho,
On February 7, 2019 11:13:34 PM GMT+01:00, Josef Miegl <josef at miegl.cz> wrote:
>I've been trying to improve my AUR packages for the last few days. I'm
>still a beginner in package maintaining so I would like to have some
>feedback on some of my PKGBUILDs. I would love to hear everything that
>is wrong about them. Thanks!
>
>pkgver() {
> cd "${srcdir}/${pkgname%-git}"
> echo $(git describe --always | sed 's/-/./g')
>}
>
Please do not use pkgver functions like that, they
don't work in vercmp as you would assume.
If upstream releases with a fix up version release
you gonna end up with a epoch bump.
You could do something like described in the wiki
sed 's/\([^-]*-g\)/r\1/;s/-/./g' }
This prefixes the revision count like:
2.0.r6.ga17a017
Which behaves properly.
https://wiki.archlinux.org/index.php/VCS_package_guidelines#The_pkgver()_function
More information about the aur-general
mailing list