Patchwork [1/1] perf: make PKGV match kernel version

login
register
mail settings
Submitter tom.zanussi@linux.intel.com
Date March 19, 2013, 4:58 a.m.
Message ID <131e09450668ef93c4d886ccc93edd0eb77cf860.1363668929.git.tom.zanussi@linux.intel.com>
Download mbox | patch
Permalink /patch/46431/
State Accepted
Commit 15ab96040f244d398954363f09e5a8110076fd29
Headers show

Comments

tom.zanussi@linux.intel.com - March 19, 2013, 4:58 a.m.
From: Tom Zanussi <tom.zanussi@linux.intel.com>

Have perf grab and use the kernel version it's built from for PKGV,
rather than the default perf recipe version, so the final packages get
the kernel version instead of the default 1.0, which represents a
backwards value from the previous recipe.

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
---
 meta/recipes-kernel/perf/perf.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Patch

diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 3c49922..182dd25 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -32,7 +32,7 @@  RDEPENDS_${PN} += "elfutils bash ${SCRIPTING_RDEPENDS}"
 
 PROVIDES = "virtual/perf"
 
-inherit kernel-arch pythonnative
+inherit linux-kernel-base kernel-arch pythonnative
 
 # needed for building the tools/perf Python bindings
 inherit python-dir
@@ -104,6 +104,10 @@  do_configure_prepend () {
     sed -i 's,-Werror ,,' ${S}/tools/perf/Makefile
 }
 
+python do_package_prepend() {
+    bb.data.setVar('PKGV', '${@get_kernelversion('${S}').split("-")[0]}', d)
+}
+
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 FILES_${PN} += "${libexecdir}/perf-core"