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

chris.laplante at agilent.com chris.laplante at agilent.com
Sun Nov 3 13:20:39 UTC 2019


> > 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 :(.

Yep, I definitely get your point. I personally am not worried about the more "pathological" cases like what you have above. My tool basically only cares about overrides that originate in local.conf. But I'm sure most hypothetical consumers of this API would not accept that limitation, so I agree that this doesn't constitute a good long-term plan. 

I will therefore keep this patch as a local modification to bitbake.

Thanks,
Chris


More information about the bitbake-devel mailing list