Bitbake: "The metadata is not deterministic and this needs to be fixed"

the fix I used is go to that recipe and add an empty line in the end, that will help bitbake re-recognize the recipe


The following is the yocto patch that adds this diagnostic message https://patchwork.openembedded.org/patch/133517/

Here is the commit message, explaining its reasons and a possible way to get further details for the problem:

Bitbake can parse metadata in the cooker and in the worker during builds. If the metadata isn't deterministic, it can change between these two parses and this confuses things a lot. It turns out to be hard to debug these issues currently.

This patch ensures the basehashes from the original parsing are passed into the workers and that these are checked when reparsing for consistency. The user is shown an error message if inconsistencies are found.

There is debug code in siggen.py (see the "Slow but can be useful for debugging mismatched basehashes" commented code), we don't enable this by default due to performance issues. If you run into this message, enable this code and you will find "sigbasedata" files in tmp/stamps which should correspond to the hashes shown in this error message. bitbake-diffsigs on the files should show which variables are changing.

Signed-off-by: Richard Purdie


Simplest solution: touch <recipename>. Then run cleansstate on your recipe. Then go on as usual from here.


I stumbled onto a similar error. For me it happened in the do_install routine. My aim was to store a copy of a file with a ${DATETIME} attached to its name referring to the build time in a specific place.

Apparently the recipes get parsed multiple times during a build and since the time has changed by the second time it got parsed a different ${DATETIME} value was inserted and thus the metadata was recognized as changed.

Tags:

Bitbake

Yocto