All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Paolo Wattebled <paolo.wattebled@savoirfairelinux.com>
Cc: bitbake-devel <bitbake-devel@lists.openembedded.org>
Subject: Re: [bitbake-devel] [PATCH] toaster: Add recipe variables view
Date: Mon, 17 Aug 2026 22:08:38 +0100	[thread overview]
Message-ID: <8558d54fda8e977ea6e677693db0586b8e10e80a.camel@linuxfoundation.org> (raw)
In-Reply-To: <1200355947.1128688.1786996086820.JavaMail.zimbra@savoirfairelinux.com>

On Mon, 2026-08-17 at 15:48 -0400, Paolo Wattebled wrote:
> > The cache you've added is per parsed recipe, not per recipe used in the
> > build. Was the patch AI assisted?
> 
> The new `recipe_variables` field is collected in the recipe parse cache for
> every parsed recipe. `buildDependTree()` copies cache fields into the
> dependency graph only for recipes in the runqueue, and Toaster persists only
> those entries. Thus the cache is per parsed recipe, while persisted Toaster
> rows are runqueue-selected.
> 
> Yes, the patch was AI-assisted, as disclosed in the commit messages. I used
> AI tools to assist with code generation, but I reviewed and tested the
> changes, and I take responsibility for the design and the submitted commits.

Sorry, I did somehow miss the tag in the commit. Nonetheless, I am
worried that the changes here aren't quite right.

> > 33 differences per recipe seems very low as well.
> > 
> > bitbake -e bash | grep -v ^# > a
> > bitbake -e quilt | grep -v ^# > b
> > diff -u a b | grep ^-[A-Z] | grep -v : | wc
> > 
> > So I've filtered only variables not functions, nothing with an override
> > and I still get 132 differences.
> 
> > I think you're missing a lot of values.
> 
> The current code records only variables whose BitBake `VariableHistory` has an
> operation from the recipe, a matching `.bbappend`, or a recipe-owned `.inc`.
> It excludes class- and configuration-only values, functions, inactive
> overrides, and values that fail expansion.
> 
> Therefore the count reflects this source filter, not the complete effective
> recipe datastore. I agree that describing the result as a resolved recipe
> variable snapshot was misleading.
> 
> This raises a question about the intended scope of the feature. In your view,
> which variables should Toaster expose here? Should it provide the complete
> effective recipe datastore, including values inherited from configuration and
> classes and values selected through overrides, or should it expose a clearly
> defined subset? If you expect a subset, which inclusion or exclusion criteria
> would you consider useful and correct?

I'm not sure what the right answer is, but I don't think your current
criteria works as you think it does.

> > Ok, how does it use variable history for selection?
> 
> Variable history is used only as a provenance filter: it selects variables
> touched by recipe metadata. The stored value is then obtained separately from
> the parsed recipe datastore using `metadata.getVar(..., True)`. The history
> itself is not stored. The compressed snapshot is carried through the dependency
> graph for runqueue recipes and then stored in Toaster's `RecipeVariable` table.

For example if the core metadata has:

X = "${Y}"
Y = "Z"

then the recipe sets Y = "A", the variable history for X doesn't change
but the value does. That is a simple example, there are much more
complex ones.

Cheers,

Richard


      reply	other threads:[~2026-08-17 21:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-12 15:04 [PATCH] toaster: Add recipe variables view Paolo Wattebled
2026-08-12 20:34 ` [bitbake-devel] " Richard Purdie
2026-08-13 15:31   ` Paolo Wattebled
2026-08-13 15:58     ` Richard Purdie
2026-08-14 14:31       ` Paolo Wattebled
2026-08-14 20:56         ` Richard Purdie
2026-08-17 19:48           ` Paolo Wattebled
2026-08-17 21:08             ` 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=8558d54fda8e977ea6e677693db0586b8e10e80a.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=paolo.wattebled@savoirfairelinux.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 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.