kernel.bbclass: Fix empty modules directory QA issue
authorNathan Rossi <nathan.rossi@xilinx.com>
Tue, 14 Jan 2014 01:21:00 +0000 (11:21 +1000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 2 Feb 2014 11:22:08 +0000 (11:22 +0000)
commitf0cb32f2cbeed09e62507ccf0e329c10b7d5f743
treee5a749809e1b558fb070e221fb6139b2c8a8cb30
parent818c0b91d20c7a5bd48faae03749a12db730f07a
kernel.bbclass: Fix empty modules directory QA issue

If a kernel is built without any external modules (aka no CONFIG_*=m),
then during a modules_install of the kernel an empty directory is
created at /lib/modules/${KERNEL_VERIONS}/kernel. This is behaviour of
the kernel infrastructure, the directory would normally be populated
with the modules that were built.

However because of the expectations of kernel-modules-split, no packages
are created when there are no modules and an empty directory lingers.
This raises QA issues as warning or errors (depending on the distro).

The following patch changes the kernel_do_install task to check if the
directory is empty and if so removes it.

(From OE-Core rev: 63d3070b7e1207164891b154a5b9017731e75872)

Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/kernel.bbclass