From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: m.felsch@pengutronix.de,
openembedded-core@lists.openembedded.org, yocto@pengutronix.de
Subject: Re: [OE-core] [PATCH] icecc: fix PN 'no-pn' handling
Date: Mon, 09 Dec 2024 17:22:40 +0000 [thread overview]
Message-ID: <adafac15e09bcfcd220cddcf0e059a109eedf390.camel@linuxfoundation.org> (raw)
In-Reply-To: <20241209164608.3595821-1-m.felsch@pengutronix.de>
On Mon, 2024-12-09 at 17:46 +0100, Marco Felsch via lists.openembedded.org wrote:
> Since bitbake commit f24bbaaddb36 ("data: Add support for new
> BB_HASH_CODEPARSER_VALS for cache optimisation") the
> BB_HASH_CODEPARSER_VALS are passed during the bb.build_dependencies()
> step.
>
> With PN set to 'no-pn' and the icecc_version() running during
> bb.build_dependencies() (due to the 'vardepsexclude') the bb.fatal() is
> triggered while parsing target-sdk-provides-dummy.bb albeit it was
> already disabled via ICECC_RECIPE_DISABLE.
>
> To fix this use_icecc() need to verify if PN is set to 'no-pn' which
> indicates the early bb.build_dependencies() task and return 'no' in that
> case.
>
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> ---
> Hi,
>
> this patch should fix the reoprted ICECC bug:
>
> https://lists.yoctoproject.org/g/yocto/topic/icecc_support_broken/103429714
>
> Regards,
> Marco
>
> meta/classes/icecc.bbclass | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
> index 159cae20f8ca..df73e31e9514 100644
> --- a/meta/classes/icecc.bbclass
> +++ b/meta/classes/icecc.bbclass
> @@ -159,6 +159,12 @@ def use_icecc(bb,d):
> bb.debug(1, "%s: bbclass %s found in disable, disable icecc" % (pn, bbclass))
> return "no"
>
> + # PN set to 'no-pn' indicates that bitbake is at the early
> + # bb.build_dependencies() stage and it's not possible to use the value to
> + # decide if icecc can be used.
> + if pn == "no-pn":
> + return "no"
> +
> disabled_recipes = (d.getVar('ICECC_RECIPE_DISABLE') or "").split()
> enabled_recipes = (d.getVar('ICECC_RECIPE_ENABLE') or "").split()
>
I'm not sure the patch description is quite right and I'm also not sure
this is a safe way to solve the issue here.
Bitbake is trying to work out the dependencies of the various
functions. The reasoning was that setting some dummy values for that
code would stop it spiralling off and analysing multiple pieces of code
that were effectively functionally identical where for example a
version string just changes.
This gets messy with shell function, for example with the shell
function:
set_icecc_env() {
if [ "${@use_icecc(bb, d)}" = "no" ]
then
return
fi
}
it has to run use_icecc() to expand that in case it turned into a block
of code.
If we take a patch like this, I would like the comment above and the
commit message to be correct. "bb.build_dependencies" doesn't exist and
the early stage you refer to is misleading as it doesn't work like
that.
If we're hitting the "NULL prefix" code in icecc_version(), wouldn't it
be better to special case pn == "no-pn" there, note that it is at
dependency parse time and return a dummy "parse-time-dummy-
icetarball.tgz" value?
Cheers,
Richard
next prev parent reply other threads:[~2024-12-09 17:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-09 16:46 [PATCH] icecc: fix PN 'no-pn' handling Marco Felsch
2024-12-09 17:22 ` Richard Purdie [this message]
[not found] ` <180F920C983A7BC6.8554@lists.openembedded.org>
2024-12-09 17:25 ` [OE-core] " Richard Purdie
2024-12-09 17:38 ` Marco Felsch
2024-12-16 17:02 ` Richard Purdie
2024-12-16 22:22 ` Marco Felsch
2024-12-16 22:33 ` 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=adafac15e09bcfcd220cddcf0e059a109eedf390.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=m.felsch@pengutronix.de \
--cc=openembedded-core@lists.openembedded.org \
--cc=yocto@pengutronix.de \
/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