[yocto] Recipe re-build when variable in local.conf changes

Khem Raj raj.khem at gmail.com
Wed Aug 22 11:16:02 PDT 2018


On Wed, Aug 22, 2018 at 8:21 AM Amol Lad <Amol.Lad at 4rf.com> wrote:
>
> Hi,
>
>
>
> Is there a way to re-build a recipe if I change a variable in local.conf?
>
>
>
> I’ve defined a variable – BUILDVERSION = “1.0.0” in local.conf. There is a recipe which uses this variable, creates a version file and populates it in the root file system. Now if I change this variable to say “2.0.0” then how can I cause my recipe to re-build so it can pick up new value?

this should cause dependent recipe to rebuild automatically,  if this
recipe appears anywhere in your image creation dependency chain you
dont have to do anything
but if you are using it in a post processing function something like
below might help

do_update_version[depends] += "${PN}:do_image_complete"
do_update_version[depends] += "<your-recipe>:do_populate_sysroot"
do_update_version[nostamp] = "1"


More information about the yocto mailing list