[yocto] Retrieve SRCREV variable value outside of a specific recipe (not modifying it)

Christopher Larson clarson at kergoth.com
Tue May 24 08:42:58 PDT 2016


On Tue, May 24, 2016 at 7:32 AM, Michael Hu <pxmyhdev at gmail.com> wrote:

> Hi,
>
> My goal is to pull recipe's SRCREV variable into a top level *.bbclass
> file. I understand we can use SRCREV_pn-<recipe_name> to modify the
> revision on the fly outside of recipe in configuration files but when I
> print out SRCREV information using ${SRCREV_pn-recipename} all I got back
> is the recipe name instead of SREREV value for that specific recipe.
>
> Is there a way to retrieve SREREV value outside of recipe?
>

One recipe cannot access metadata from another, nor can config metadata
access recipe metadata, by design. I'd recommend enabling buildhistory and
using the buildhistory-collect-srcrevs script, which dumps SRCREV_pn- lines
for recipes, for use in a .conf/.inc/.bbclass.
-- 
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.yoctoproject.org/pipermail/yocto/attachments/20160524/f1571af9/attachment.html>


More information about the yocto mailing list