]> code.ossystems Code Review - openembedded-core.git/commitdiff
lttng-modules: allow building without tracepoints enabled in kernel
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Mon, 1 Jul 2013 14:21:17 +0000 (15:21 +0100)
committerSaul Wold <sgw@linux.intel.com>
Tue, 2 Jul 2013 14:58:09 +0000 (07:58 -0700)
Avoid a QA failure and instead produce a sensible warning message if no
modules were built.

Fixes [YOCTO #4791].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/recipes-kernel/lttng/lttng-modules_2.1.1.bb

index 700c4c5760f71409d1db1ed0ab86f35d2bd9536d..0bbaa817cadf6bcd07f9a8d3a83a6c6705d87e63 100644 (file)
@@ -22,3 +22,14 @@ export KERNEL_SRC="${STAGING_KERNEL_DIR}"
 
 
 S = "${WORKDIR}/git"
+
+do_install_append() {
+       # Delete empty directories to avoid QA failures if no modules were built
+       find ${D}/lib -depth -type d -empty -exec rmdir {} \;
+}
+
+python do_package_prepend() {
+    if not os.path.exists(os.path.join(d.getVar('D', True), 'lib/modules')):
+        bb.warn("%s: no modules were created; this may be due to CONFIG_TRACEPOINTS not being enabled in your kernel." % d.getVar('PN', True))
+}
+