[OE-core] How to force BitBake to track dependency to METADATA_REVISION?
Richard Purdie
richard.purdie at linuxfoundation.org
Fri May 6 10:49:22 UTC 2016
On Fri, 2016-05-06 at 10:10 +0000, Kucharczyk, Bartlomiej (Nokia -
PL/Wroclaw) wrote:
> > Bitbake tracks unexpanded forms of variables, not expanded. So it's
> > literally storing '${@base_detect_revision(d)}" in the checksum,
> > not the actual revision.
> > METADATA_REVISION[vardepvalue] = "${METADATA_REVISION}" in your
> > recipe will do it.
>
> Hello!
>
> Thanks for your answer. I've tried to use vardepvalue, but it does
> not work... After I build it for the second time (after bumping git
> revision), nothing is rebuilt.
>
> $ bitbake test
> ...
> NOTE: Tasks Summary: Attempted 251 tasks of which 0 didn't need
> to be rerun and all succeeded.
> ...
> $ echo "" >> ../README
> $ git commit -m"test" ../README
> $ bitbake test
> ...
> NOTE: Tasks Summary: Attempted 251 tasks of which 251 didn't need
> to be rerun and all succeeded.
> ...
>
> My test recipe is:
>
> $ cat ../meta/recipes-devtools/test/test_1.0.bb
> LICENSE = "CLOSED"
> INHIBIT_DEFAULT_DEPS = "1"
> METADATA_REVISION[vardepvalue] = "${METADATA_REVISION}"
> do_compile(){
> echo "${METADATA_REVISION}" > "${S}/testfile"
> }
>
> Any suggestions?
The problem is probably the cache. It has no knowledge of when it needs
to reparse to see if this value has changed. If you set BB_DONT_CACHE =
"1" in the recipe, does that help?
Cheers,
Richard
More information about the Openembedded-core
mailing list