From: Benjamin ROBIN <benjamin.robin@bootlin.com>
To: Joshua Watt <jpewhacker@gmail.com>
Cc: openembedded-core@lists.openembedded.org,
kamel.bouhara@bootlin.com, mathieu.dubois-briand@bootlin.com,
jeremie.dautheribes@bootlin.com, thomas.petazzoni@bootlin.com,
antonin.godard@bootlin.com, pascal.eberhard@se.com
Subject: Re: [PATCH v2] meta: fix generation of kernel CONFIG_ in SPDX3
Date: Tue, 24 Feb 2026 10:10:25 +0100 [thread overview]
Message-ID: <2030868.PYKUYFuaPT@brobin-bootlin> (raw)
In-Reply-To: <CAJdd5GZqLc0ocXyMC9v4gV-DYBM4vA+RjQYVgnNyH7HH1QZDBg@mail.gmail.com>
On Monday, February 23, 2026 at 6:43 PM, Joshua Watt wrote:
> I like this in general, but if you're going to bbappend, the `return`
> will mess with any other appends, so it needs to be avoided. Probably
> just put all the code under a
> `if bb.data.inherits_class("create-spdx-3.0", d):` instead
Indeed, thank you for your feedback.
My initial plan was to move all code inside a Python function named
create_kernel_config_spdx, and to call this function from
do_create_spdx:append().
Sadly, the generated code looks like this:
```
def do_create_spdx(d):
import oe.spdx30_tasks
oe.spdx30_tasks.create_spdx(d)
create_kernel_config_spdx()
do_create_spdx(d)
def create_kernel_config_spdx(d):
# Code of the function
```
This is not going to work, since the create_kernel_config_spdx() is declared
after the call to do_create_spdx().
From my point of view, there is a bug in bitbake code : The emit_func_python()
function declared in lib/bb/data.py does not generate code in the right
order: The "write_func(func, o, True)" should be called at the end of
emit_func_python().
I am missing something, or is there any reason why emit_func_python() is
implemented that way?
Anyway I am preparing a v3, that solve this issue differently.
Best regards,
--
Benjamin Robin, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2026-02-24 9:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-16 8:47 [PATCH v2] meta: fix generation of kernel CONFIG_ in SPDX3 Benjamin Robin
2026-02-23 17:43 ` Joshua Watt
2026-02-24 9:10 ` Benjamin ROBIN [this message]
2026-02-24 9:22 ` [OE-core] " 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=2030868.PYKUYFuaPT@brobin-bootlin \
--to=benjamin.robin@bootlin.com \
--cc=antonin.godard@bootlin.com \
--cc=jeremie.dautheribes@bootlin.com \
--cc=jpewhacker@gmail.com \
--cc=kamel.bouhara@bootlin.com \
--cc=mathieu.dubois-briand@bootlin.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=pascal.eberhard@se.com \
--cc=thomas.petazzoni@bootlin.com \
/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