[bitbake-devel] [PATCH] bitbake: command: add getOverrideData command

Richard Purdie richard.purdie at linuxfoundation.org
Sun Nov 3 09:44:12 UTC 2019


On Sat, 2019-11-02 at 23:11 +0000, chris.laplante at agilent.com wrote:
> Hi Richard,
> 
> > The question here is what is the usecase?
> > 
> > The override data in this form is really a datastore internal and
> > shouldn't be something we expose an external API for. It happens to
> > exist in this form for the current implementation of the datastore
> > but
> > it didn't used to and may not again, depending on how we change
> > that
> > implementation, particularly as people look at parsing performance.
> 
> Would it make more sense to come up with an external representation
> of the data that we could expose as a stable API?
> 
> My particular use case is that I needed to identify if and where
> SRCREV is getting overridden for particular recipes. For instance,
> someone might have added a SRCREV_pn-recipe to their local.conf. I am
> working on a tool that produces "buildhistory-collect-srcrevs"-style
> output from the SRCREV cache itself, without actually requiring that
> buildhistory is enabled. It's actually a general tool to inspect and
> manipulate the SRCREV cache. My team uses AUTOREV pretty extensively,
> so this kind of tool will be very useful to us.

I think it depends what kind of guarantees we're expecting around this.
For example:

python () {
    if d.getVar("MACHINE") == "bar":
        d.setVar("SRCREV", "problem")
}

Really the only way to be sure is to parse for each MACHINE and see
what the values are. I did wonder if you could just switch between
MACHINE values but that doesn't even cover the python above without the
datastore finalisation.

Basically my worry is what the expectations of the API are. Whilst you
may be fine with the limitations, its the makings of an unsolvable bug
report tomorrow :(.

Cheers,

Richard



More information about the bitbake-devel mailing list