]> code.ossystems Code Review - openembedded-core.git/commitdiff
perf: make PKGV match kernel version
authorTom Zanussi <tom.zanussi@linux.intel.com>
Tue, 19 Mar 2013 04:58:07 +0000 (23:58 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 19 Mar 2013 11:54:19 +0000 (11:54 +0000)
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-kernel/perf/perf.bb

index 3c499224c744dd44b2b17f6ac3142c1036dae26c..182dd25d6eafe3a9be1929f57381443d287a799c 100644 (file)
@@ -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"