]> code.ossystems Code Review - openembedded-core.git/commitdiff
lttng-modules: Replace '/lib' with ${nonarch_base_libdir}
authorAmarnath Valluri <amarnath.valluri@intel.com>
Tue, 14 Feb 2017 14:07:56 +0000 (16:07 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 21 Mar 2017 22:43:01 +0000 (22:43 +0000)
Do not assume '/lib' for kernel modules location, instead use
${nonarch_base_libdir}. When 'usrmerge' is enabled, kernel modules are not
located in /lib/modules, but /usr/lib/modules.

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
meta/recipes-kernel/lttng/lttng-modules_2.9.1.bb

index 8e47c6f0a1bc189190a8f634e724d0e863fd42d9..abff79d06f26ea8c2bc4df51f3f77fc1fd05f497 100644 (file)
@@ -22,11 +22,11 @@ EXTRA_OEMAKE += "KERNELDIR='${STAGING_KERNEL_DIR}'"
 
 do_install_append() {
        # Delete empty directories to avoid QA failures if no modules were built
-       find ${D}/lib -depth -type d -empty -exec rmdir {} \;
+       find ${D}/${nonarch_base_libdir} -depth -type d -empty -exec rmdir {} \;
 }
 
 python do_package_prepend() {
-    if not os.path.exists(os.path.join(d.getVar('D'), 'lib/modules')):
+    if not os.path.exists(os.path.join(d.getVar('D'), d.getVar('nonarch_base_libdir')[1:], 'modules')):
         bb.warn("%s: no modules were created; this may be due to CONFIG_TRACEPOINTS not being enabled in your kernel." % d.getVar('PN'))
 }