[yocto] : git tag and PV variable

GUEYTAT Julien j.gueytat at cdssoft.studiel.fr
Thu Feb 25 05:19:22 PST 2016


Perfect I'll give it a try! :)

-----Message d'origine-----
De : Maciej Borzecki [mailto:maciej.borzecki at open-rnd.pl] 
Envoyé : mercredi 24 février 2016 19:10
À : yocto at yoctoproject.org; GUEYTAT Julien
Objet : Re: [yocto] : git tag and PV variable


> Dnia 24 luty 2016 o 17:02 Alexander Kanavin 
> <alexander.kanavin at linux.intel.com> napisał(a):
>
>
> 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.
>

I actually wrote a class for this that works with externalsrc git packages. The idea was to replicate the functionality of gitpkgv but for external sources. The code is here:
https://github.com/open-rnd/meta-openrnd/blob/master/classes/externalgitsrc.bbclass

You just `inherit externalgitsrc` and it will set EXTERNALSRC_GIT_SRCREV and EXTERNALSRC_GITPKGV.

--
Maciej Borzęcki
Senior Software Engineer at Open-RnD Sp. z o.o.
www.open-rnd.pl, Facebook, Twitter


More information about the yocto mailing list