[oe-commits] Paul Eggleton : lttng-modules: allow building without tracepoints enabled in kernel

git at git.openembedded.org git at git.openembedded.org
Tue Jul 2 21:20:45 UTC 2013


Module: openembedded-core.git
Branch: master
Commit: 3ef5b19cbd7a90e11fc61223737b0b8e0e60b1a3
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=3ef5b19cbd7a90e11fc61223737b0b8e0e60b1a3

Author: Paul Eggleton <paul.eggleton at linux.intel.com>
Date:   Mon Jul  1 15:21:17 2013 +0100

lttng-modules: allow building without tracepoints enabled in kernel

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 at linux.intel.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>

---

 meta/recipes-kernel/lttng/lttng-modules_2.1.1.bb |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.1.1.bb b/meta/recipes-kernel/lttng/lttng-modules_2.1.1.bb
index 700c4c5..0bbaa81 100644
--- a/meta/recipes-kernel/lttng/lttng-modules_2.1.1.bb
+++ b/meta/recipes-kernel/lttng/lttng-modules_2.1.1.bb
@@ -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))
+}
+



More information about the Openembedded-commits mailing list