From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: "Chen, Qi" <Qi.Chen@windriver.com>,
"openembedded-core@lists.openembedded.org"
<openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core][PATCH 1/2] classes/recipes: remove unnecessary qemu inherit and qemu-native dependency
Date: Thu, 10 Apr 2025 07:42:07 +0100 [thread overview]
Message-ID: <5e07f80db60ee353f2acd1ed0d8d7bdb00544337.camel@linuxfoundation.org> (raw)
In-Reply-To: <CO6PR11MB5602D636B4069B499A6EF4D1EDB72@CO6PR11MB5602.namprd11.prod.outlook.com>
On Thu, 2025-04-10 at 06:31 +0000, Chen, Qi wrote:
> The postinst uses qemuwrapper which in turns uses qemu-native. But
> the postinst runs at do_rootfs time. And this dependency is ensured
> by the following line:
> meta/classes-recipe/image.bbclass:DEPENDS += "${@' '.join(["%s-
> qemuwrapper-cross" % m for m in
> d.getVar("MULTILIB_VARIANTS").split()])} qemuwrapper-cross
> depmodwrapper-cross cross-localedef-native"
>
> PACKAGE_WRITE_DEPS is for do_package_write_rpm/deb/ipk. These tasks
> do not run postinst and thus not using qemu-native. So 'qemu-native'
> can be removed from PACKAGE_WRITE_DEPS safely.
>
> For the removal of qemu.bbclass inherit, these classes/recipes do not
> really use any function from this qemu.bbclass. So we can safely
> remove 'inherit qemu' for them.
>
> My test for this patch 1/2 is: qemux86-64 + systemd + bitbake core-
> image-sato. There's no error.
Something needs to trigger the system to have qemu-native available at
do_rootfs time since these recipes write a postinstall which can use
qemu. That is what PACKAGE_WRITE_DEPS is for. I suspect you're pulling
in qemu through other dependencies but that doesn't mean this one is
unneeded.
package.bbclass has a comment about this:
# If your postinstall can execute at rootfs creation time rather than on
# target but depends on a native/cross tool in order to execute, you need to
# list that tool in PACKAGE_WRITE_DEPS. Target package dependencies belong
# in the package dependencies as normal, this is just for native/cross support
# tools at rootfs build time.
PACKAGE_WRITE_DEPS ??= ""
As for the qemu class inherit, the code used to write the qemu binary
call into the postinst but it uses qemuwrapper now which comes from
qemuwrapper-cross. I suspect you're right that it means the qemu
inherit is no longer needed however we should probably change the
inherit qemu for a PACKAGE_WRITE_DEPS += "qemuwrapper-cross"?
(and see if we could remove the dependency in image.bbclass?)
Cheers,
Richard
next prev parent reply other threads:[~2025-04-10 6:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-10 4:08 [OE-core][PATCH 1/2] classes/recipes: remove unnecessary qemu inherit and qemu-native dependency Qi.Chen
2025-04-10 4:08 ` [OE-core][PATCH 2/2] lib/classes/recipes: refactor qemu.bbclass functions into library functions Qi.Chen
2025-04-10 7:50 ` Alexander Kanavin
2025-04-10 8:54 ` Chen, Qi
2025-04-10 6:15 ` [OE-core][PATCH 1/2] classes/recipes: remove unnecessary qemu inherit and qemu-native dependency Richard Purdie
2025-04-10 6:31 ` Chen, Qi
2025-04-10 6:42 ` Richard Purdie [this message]
2025-04-10 6:45 ` Chen, Qi
2025-04-10 7:27 ` Richard Purdie
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=5e07f80db60ee353f2acd1ed0d8d7bdb00544337.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox