[OE-core] How to force BitBake to track dependency to METADATA_REVISION?

Christopher Larson clarson at kergoth.com
Thu May 5 23:08:48 UTC 2016


On Thu, May 5, 2016 at 11:48 AM, Kucharczyk, Bartlomiej (Nokia -
PL/Wroclaw) <bartlomiej.kucharczyk at nokia.com> wrote:

> I am trying to use METADATA_REVISION variable (defined in
> metadata_scm.bbclass) in my recipe, but BitBake does not rebuild the task
> when git revision of the repository changes.
> Setting [vardeps] does not help.
>
> I suspect this may be related to the fact that METADATA_REVISION is
> defined this way:
>         METADATA_REVISION ?= "${@base_detect_revision(d)}"
> And BitBake does not expand this to the proper value, thus does not see
> any difference.
>
> Does anyone have any suggestion how to tackle this issue, and force
> BitBake to properly track dependency to METADATA_REVISION value?
>
> My original task is:
> Package feeds/SDK installers are versioned (git metadata revision). I am
> trying to create an opkg.conf file which will contain such versioned
> package feeds URL in SDK installer. For build reproducibility, and user
> convenience.
>

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.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20160505/beebc639/attachment-0002.html>


More information about the Openembedded-core mailing list