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]. (From OE-Core rev: 3ef5b19cbd7a90e11fc61223737b0b8e0e60b1a3) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
891ee9d585
commit
fba5c25ba8
|
@ -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))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue