On Thu, Jun 16, 2016 at 8:11 AM, Marco Garzola <marco.garz...@tecniplast.it>
wrote:

> I got a problem, maybe someone could help me.I have a recipe that takes
> from a jenkins server via json API a binary file with a version that i know
> only after do_compile task. the question is : is there any way to tell
> bitbake that $PV should change dynamically  , maybe in do_install task ? My
> goal is  to create the package with  the revision read from jenkins.


PV has to be set at parse time, up front, so bitbake can use it in stamps
to help determine when tasks need to be run, as well as including it in
WORKDIR and whatnot.

If all you want is to change the version in the emitted binary packages,
you can dynamically set PKGV, i.e. add a prefunc before do_package which
reads the PKGV. Of course, making sure it re-runs the appropriate tasks
when that value changes is rather less trivial, since bitbake generates
signatures/checksums at parse time.

Alternatively, would it be possible to contact the server via the json API
at parse time as long as BB_NO_NETWORK isn't set? Of course, unless there's
a way to support the BB_NO_NETWORK case, that would be problematic as well.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to