[oe] Examples of srctree and gitver

Ambrose, Martin martin at ti.com
Sun May 30 19:26:43 UTC 2010


On Sun, May 30, 2010 at 11:27:45, Michael Smith wrote:

> On Sun, 30 May 2010, Ambrose, Martin wrote:

> > Are there any recipes/examples which use these classes?
> 

> # Strip off the leading 'v' from the Linux kernel git tags
> GITVER_NO_V = "${@'${GITVER}'[1:]}"
> PV = "${GITVER_NO_V}"
> 

Thanks for the pointer.

Looking at the class I see 
    ver = popen(["git", "describe", "--tags"], cwd=path)                                                                                                                                                                                     
    if not ver:                                                                                                                                                                                                                              
        ver = popen(["git", "rev-parse", "--short", "HEAD"], cwd=path)

Normally I work on a named branch so the PV here becomes the capitalized
branch name. My preference would be the shortened commit id which is the
fallback option above. I guess no way to get this functionality unless I
either don't work a branch or locally modify gitver.bbclass.

Regards, 
Martin




More information about the Openembedded-devel mailing list