[bitbake-devel] Forcing a task to run depending on the output of a python script?

Becker Béla bela at becker.rocks
Thu May 10 19:25:35 UTC 2018


My goal is to have a fancy version string, computed from my meta layer using versions of the `git describe` command, to be stored in the file system, but I can't figure out how I can invalidate the cache for my recipe in order for the do_install task to fire.

Currently, I'm using an anonymous python script instide a .bbclass to set up a variable ( let's call it ${VERSION} ) using git's numerous commands. This is then inherited in a .bb file, that contains a single file for the target, under /etc with my fancy string.

When I run `bitbake -e git-version`, I can see that leaving a commit changes the variable, but the package isn't rebuilt, not until I force it.

So far I have tried:
-setting `PV = ${VERSION}`
-changing the task basehash with `BB_BASEHASH_task-do_install += ${VERSION}`
-adding VERSION to do_install[vardeps]

Is it possible, to have this package be rebuilt when a change occurs, so the images will be rebuilt as well?



More information about the bitbake-devel mailing list