All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Chen Qi <Qi.Chen@windriver.com>,
	openembedded-core@lists.openembedded.org
Subject: Re: [OE-core][PATCH] populate_sdk_base: remove useless dirs such as /dev
Date: Wed, 05 Jan 2022 11:24:40 +0000	[thread overview]
Message-ID: <d23c4c620f3a5d66109896ab5a4716aa8fc7dae8.camel@linuxfoundation.org> (raw)
In-Reply-To: <20220105060154.68560-1-Qi.Chen@windriver.com>

On Tue, 2022-01-04 at 22:01 -0800, Chen Qi wrote:
> We met a problem that core-image-tiny-initramfs's SDK cannot be
> installed. The error message is like below.
> 
>   tar: ./sysroots/core2-64-poky-linux/dev/console: Cannot mknod: Operation not permitted
> 
> In fact, the '/dev' direcotry is useless for SDK. So remove it.
> 
> This patches uses a variable, SDK_USELESS_DIRS, to hold useless dir entries
> so that it could be extended. For example, '/usr/bin' could be added if wanted.
> 
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>  meta/classes/populate_sdk_base.bbclass | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
> index fafdd96749..d4065b9b13 100644
> --- a/meta/classes/populate_sdk_base.bbclass
> +++ b/meta/classes/populate_sdk_base.bbclass
> @@ -92,6 +92,8 @@ SDK_HOST_MANIFEST = "${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"
>  SDK_EXT_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.target.manifest"
>  SDK_EXT_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.host.manifest"
>  
> +SDK_USELESS_DIRS ?= "/dev"
> +

I think this is the better approach to solving the issue but I don't agree with
the name "USELESS". Something like SDK_PRUNE_SYSROOT_DIRS would probably better
describe what the code is doing.


>  python write_target_sdk_manifest () {
>      from oe.sdk import sdk_list_installed_packages
>      from oe.utils import format_pkg_list
> @@ -103,6 +105,12 @@ python write_target_sdk_manifest () {
>          output.write(format_pkg_list(pkgs, 'ver'))
>  }
>  
> +delete_useless () {

This needs some prefix so we know it is sdk related as well as the useless name
change.


Cheers,

Richard




      reply	other threads:[~2022-01-05 11:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-05  6:01 [OE-core][PATCH] populate_sdk_base: remove useless dirs such as /dev Chen Qi
2022-01-05 11:24 ` Richard Purdie [this message]

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=d23c4c620f3a5d66109896ab5a4716aa8fc7dae8.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=Qi.Chen@windriver.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.