From: Robert Yang <liezhi.yang@windriver.com>
To: Nathan Rossi <nathan.rossi@xilinx.com>,
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] kernel.bbclass: Fix empty modules directory QA issue
Date: Mon, 13 Jan 2014 16:45:26 +0800 [thread overview]
Message-ID: <52D3A7A6.6060502@windriver.com> (raw)
In-Reply-To: <2bba5e79-d06e-4b11-98ab-59506c84f896@AM1EHSMHS006.ehs.local>
On 01/13/2014 04:33 PM, Nathan Rossi wrote:
> 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.
>
> Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
> ---
> meta/classes/kernel.bbclass | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 5fef446..6b4e992 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -183,6 +183,10 @@ kernel_do_install() {
> oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" modules_install
> rm "${D}/lib/modules/${KERNEL_VERSION}/build"
> rm "${D}/lib/modules/${KERNEL_VERSION}/source"
> + # If the kernel/ directory is empty remove it to prevent QA issues
How about:
rmdir --ignore-fail-on-non-empty ${D}/lib/modules/${KERNEL_VERSION}/kernel
// Robert
> + if [ ! "$(ls -A "${D}/lib/modules/${KERNEL_VERSION}/kernel")" ]; then
> + rm -r "${D}/lib/modules/${KERNEL_VERSION}/kernel"
> + fi
> else
> bbnote "no modules to install"
> fi
>
next prev parent reply other threads:[~2014-01-13 8:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-13 8:33 [PATCH] kernel.bbclass: Fix empty modules directory QA issue Nathan Rossi
2014-01-13 8:45 ` Robert Yang [this message]
2014-01-14 1:21 ` [PATCH v2] " Nathan Rossi
[not found] ` <1389662460-29515-1-git-send-email-nathan.rossi@xilinx.com>
2014-01-28 1:19 ` Nathan Rossi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52D3A7A6.6060502@windriver.com \
--to=liezhi.yang@windriver.com \
--cc=nathan.rossi@xilinx.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.