[oe] Examples of srctree and gitver

Chris Larson clarson at kergoth.com
Sun May 30 16:16:16 UTC 2010


On Sun, May 30, 2010 at 8:07 AM, Ambrose, Martin <martin at ti.com> wrote:

> Hello.
>
> Are there any recipes/examples which use these classes?
>
> I grep'ed oe mainline/poky/arago/kergoth but no luck.


I expect they'd be most useful in development, so no, I don't know of any
examples in an OE tree today.  It's pretty straightforward.  Add inherit
srctree, point S at your local source tree (or put the recipe inside the
sourcetree, it defaults to the dir the recipe is in), and it'll build from
that local tree rather than doing the fetch+unpack+patch process.  The only
real potential complexity there is the 'clean' task -- how you want to clean
your source tree may vary.  Iirc, the default will run a 'make clean', but
there's a function provided to use git to clean it.  gitver just sets GITVER
with 'git describe' information, to give you a version based on the current
contents of the local git tree, and it attempts to arrange things so it will
automatically be updated if you make any local commits to the tree.  Iirc
there's a hook provided to let you mangle the tags in the git repository
into the GITVER value -- an example of this would be stripping off the
leading 'v' in the tags in the linux kernel repository.

I'll see if I can find some example recipes for you, I know I had an example
repo set up when I was writing the classes.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics



More information about the Openembedded-devel mailing list