Re: [PATCH] kbuild: pacman-pkg: make "rc" releases adhere to pacman versioning scheme
From: Nathan Chancellor
Date: Thu May 14 2026 - 09:23:46 EST
On Thu, 14 May 2026 01:17:29 +0200, Viktor Jägersküpper <viktor_jaegerskuepper@xxxxxxxxxx> wrote:
> diff --git a/scripts/package/PKGBUILD b/scripts/package/PKGBUILD
> index 452374d63c24..fe629074b4e8 100644
> --- a/scripts/package/PKGBUILD
> +++ b/scripts/package/PKGBUILD
> @@ -10,7 +10,7 @@ for pkg in $_extrapackages; do
> pkgname+=("${pkgbase}-${pkg}")
> done
>
> -pkgver="${KERNELRELEASE//-/_}"
> +pkgver="$(echo "${KERNELRELEASE}" | sed 's/-rc/rc/;s/-/_/g')"
Sashiko notes [1] (with a contrived example) that this could result in
custom localversions being matched and adjusted. While I don't think it
is that big of a deal given how specific the example is, it takes little
effort to make the match more restrictive to make such a situation less
likely:
pkgver="$(echo "${KERNELRELEASE}" | sed 's/-\(rc[0-9]\+\)/\1/;s/-/_/g')"
[1]: https://sashiko.dev/#/patchset/20030
--
Cheers,
Nathan