[yocto] : git tag and PV variable

Martin Jansa martin.jansa at gmail.com
Wed Feb 24 08:39:15 PST 2016


On Wed, Feb 24, 2016 at 06:02:08PM +0200, Alexander Kanavin wrote:
> On 02/24/2016 05:35 PM, Khem Raj wrote:
> >
> >     I have this command in my qmake pro files:____
> >
> >     VERSION = $$system(git describe --abbrev=0 --tags)____
> >
> >     __ __
> >
> >     I would like to have the package manager follow the tag versioning.____
> >
> >     __ __
> >
> >     Which means I would like to have something like:____
> >
> >     PV = "git describe --abbrev=0 --tags"____
> >
> >     SRC_URI = "${STUDIEL_GIT}/core.git;protocol=file;tag=${PV}"____
> >
> >     __ __
> >
> >     It does not work for sure. What is the correct way to do this ?
> >
> >
> > ​SRC_URI is required by fetcher and there is nothing to git describe
> > before it is fetched.​
> > so thats your problem.
> 
> It's possible however to write an external script that updates the PV 
> version in the recipe, but it needs to be run outside of bitbake.

We already have 2 bbclasses to do that
meta-openembedded/meta-oe/classes/gitpkgv.bbclass
meta-openembedded/meta-oe/classes/gitver.bbclass

there were some plans to get one of them to oe-core, but IIRC it was
decided to create support for this in bitbake fetcher, I'm not sure how
far it went with actual implementation.

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20160224/fa766915/attachment.pgp>


More information about the yocto mailing list