Skip to content

Commit 2025507

Browse files
viktorjkNicolas Schier
authored andcommitted
kbuild: pacman-pkg: make "rc" releases adhere to pacman versioning scheme
The package versioning scheme does not enable smooth upgrades from "rc" releases to the corresponding stable releases (e.g. 7.0.0-rc7 -> 7.0.0) because pacman considers that a downgrade due to the underscore in pkgver (e.g. 7.0.0_rc7), see e.g. vercmp(8) for an explanation of the package version comparison used by pacman. Package versions which are derived from said releases (e.g. built from git revisions) are similarly affected. Fix this by modifying pkgver in order to remove the hyphen from kernel versions containing "-rcN", where N is a non-negative integer. Acked-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Viktor Jägersküpper <viktor_jaegerskuepper@freenet.de> Reviewed-by: Nathan Chancellor <nathan@kernel.org> Tested-by: Nathan Chancellor <nathan@kernel.org> Link: https://patch.msgid.link/20260515215913.92481-1-viktor_jaegerskuepper@freenet.de Fixes: c857853 ("kbuild: add script and target to generate pacman package") Signed-off-by: Nicolas Schier <nsc@kernel.org>
1 parent 49f8fcd commit 2025507

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/package/PKGBUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ for pkg in $_extrapackages; do
1010
pkgname+=("${pkgbase}-${pkg}")
1111
done
1212

13-
pkgver="${KERNELRELEASE//-/_}"
13+
pkgver="$(echo "${KERNELRELEASE}" | sed 's/-\(rc[0-9]\+\)/\1/;s/-/_/g')"
1414
# The PKGBUILD is evaluated multiple times.
1515
# Running scripts/build-version from here would introduce inconsistencies.
1616
pkgrel="${KBUILD_REVISION}"

0 commit comments

Comments
 (0)