[yocto] Task vardeps on a variable changed externally

Andrei Gherzan andrei at gherzan.ro
Wed Oct 9 02:42:37 PDT 2019


Hi guys,

I struggle to figure out an issue that I lately got into. I want to have 
a recipe which writes a manifest of all the layers part of the build. 
These layers are all git repositories and I want their revision to be 
exposed at runtime. So I obviously have a a python function which 
computes let's say, for the sake of example, a revision of one layer.

def get_rev(d):
     # returns revision of a repository

LAYER_REVISION := "${get_rev(d)}"

The recipe also has a `do_compile` variable dependency:
do_compile[vardeps] += "LAYER_REVISION"

Checking the task signature I see the inclusion of the expanded variable 
LAYER_REVISION.

Now, if I externally change the revision of that respective layer the 
task is not re-triggered even so the recipe environment reports the 
updated variable (bitbake -e). What is even more confusing is that if 
for whatever reason the do_compile task gets invalidated (or I force 
it), the build system returns a "basehash value changed" error.

I would expect that the change of revision to trickle a task 
invalidation and the task to be rerun but that doesn't seem to happen as 
described above.

-- 
Andrei Gherzan


More information about the yocto mailing list