Task is not re-triggered even if variables in vardeps change #yocto #bitbake


Mohannad Oraby
 

Hi guys, 

I have an issue related to vardeps where I am making a task dependent on some variables. 

I have created some new variables e.g., NEW_VARIABLE, added them to BB_ENV_EXTRAWHITE. In some recipes, I wrote my own implementation of some tasks that are dependent on these new variables, and for this dependency to work I added  e.g., do_install[vardeps] = "NEW_VARIABLE", so I am now expecting that every time I change this NEW_VARIABLE and perform e.g., "bitbake recipename", the do_install task should run. I checked the task signature and I see the NEW_VARIABLE there.

Let's assum I have two possible values for this variable. When I set the variable for the first time "value1", i.e., the first build, everything works and there is no problem. When I change its value to the other value "value2" not used before and build the recipe again, the do_install will also run and no problem occurs. The problem is however, if I set the variable again to the old value "value1", and I execite "bitbake recipename" again. The do_install will not be re-triggered, and this leads to some wrong/old data located in work directory, and also produced in the image. 

I tried setting BB_DONT_CACHE, as I understood in an old topic that the problem might be that the recipe needs to be parsed again, however this did not work at all.

I do not want to always run the tasks when I perform a new build, i.e., do_install[[nostamp] = "1", I just want it to run again every time I change this NEW_VARIABLE.

Is what I am expecting a normal behavior? Or Yocto does not work this way?

Regards
Mohannad

Join yocto@lists.yoctoproject.org to automatically receive all group messages.