poky/meta
Hongxu Jia 37dd8810df kernelsrc/perf: clean up package version while using kernel source
If recipe inherits bbclass kernelsrc to use kernel sources,
the recipe should explicitly set ${KERNEL_VERSION} to ${PKGV}
in task do_package, otherwise package version (${PV} is usually
default 1.0) is not consistent with kernel source.

For example, there are 5 recipes in meta-openembedded to inherit
kernelsrc, but 4 recipes explicitly set PKGV.

meta-openembedded$ grep -e "setVar(.*PKGV.*KERNEL_VERSION" -e kernelsrc -rn *
meta-oe/recipes-kernel/intel-speed-select/intel-speed-select.bb:9:inherit kernelsrc
meta-oe/recipes-kernel/bpftool/bpftool.bb:8:inherit bash-completion kernelsrc kernel-arch
meta-oe/recipes-kernel/bpftool/bpftool.bb:44:    d.setVar('PKGV', d.getVar("KERNEL_VERSION").split("-")[0])
meta-oe/recipes-kernel/cpupower/cpupower.bb:8:inherit kernelsrc kernel-arch bash-completion
meta-oe/recipes-kernel/cpupower/cpupower.bb:32:    d.setVar('PKGV', d.getVar("KERNEL_VERSION").split("-")[0])
meta-oe/recipes-kernel/turbostat/turbostat.bb:98:    d.setVar('PKGV', d.getVar("KERNEL_VERSION").split("-")[0])
meta-oe/recipes-kernel/usbip-tools/usbip-tools.bb:25:inherit kernelsrc autotools-brokensep
meta-oe/recipes-kernel/usbip-tools/usbip-tools.bb:68:    d.setVar('PKGV', d.getVar("KERNEL_VERSION").split("-")[0])
meta-oe/recipes-kernel/spidev-test/spidev-test.bb:7:inherit bash-completion kernelsrc kernel-arch
meta-oe/recipes-kernel/spidev-test/spidev-test.bb:26:    d.setVar('PKGV', d.getVar("KERNEL_VERSION").split("-")[0])

This commit clean up the setting of PKGV, move it to kernelsrc.bbclass
for common use, the recipe (such as intel-speed-select) that inherited
kernelsrc will not be required to explicitly set ${PKGV} with
${KERNEL_VERSION}

(From OE-Core rev: 77a93e8cf1da4231341c56f64f9d4d474f9f2bb7)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-07-03 10:40:17 +01:00
..
classes clang-native: Add class to use clang as native compiler 2025-07-03 10:40:17 +01:00
classes-global sanity: Reference gcc/g++ directly 2025-07-03 10:40:16 +01:00
classes-recipe kernelsrc/perf: clean up package version while using kernel source 2025-07-03 10:40:17 +01:00
conf spdx30: Allow VEX Justification to be configurable 2025-07-03 10:40:17 +01:00
files uninative/utils: Drop workarounds for gcc 4.8/4.9 2025-07-03 10:40:16 +01:00
lib spdx30: Allow VEX Justification to be configurable 2025-07-03 10:40:17 +01:00
recipes-bsp opensbi: bump to 1.7 2025-07-03 10:40:17 +01:00
recipes-connectivity mobile-broadband-provider-info: upgrade 20240407 -> 20250613 2025-07-03 10:40:17 +01:00
recipes-core libucontext: use hard/soft float 2025-07-03 10:40:17 +01:00
recipes-devtools libmodulemd: upgrade 2.15.1 -> 2.15.2 2025-07-03 10:40:17 +01:00
recipes-extended libarchive: correct upstream version check 2025-07-03 10:40:17 +01:00
recipes-gnome meta: remove consecutive blank lines 2025-06-20 12:07:27 +01:00
recipes-graphics mesa: upgrade 25.1.3 -> 25.1.4 2025-07-03 10:40:17 +01:00
recipes-kernel kernelsrc/perf: clean up package version while using kernel source 2025-07-03 10:40:17 +01:00
recipes-multimedia gst-examples: upgrade 1.26.2 -> 1.26.3 2025-07-03 10:40:16 +01:00
recipes-rt meta: remove S in recipes that fetch from git via setting BB_GIT_DEFAULT_DESTSUFFIX 2025-06-20 12:07:26 +01:00
recipes-sato meta: remove consecutive blank lines 2025-06-20 12:07:27 +01:00
recipes-support libproxy: upgrade 0.5.9 -> 0.5.10 2025-07-03 10:40:17 +01:00
site site/arm-linux: Fix typo for sizeof_char_p 2024-11-21 12:16:28 +00:00
COPYING.MIT
recipes.txt