All of lore.kernel.org
 help / color / mirror / Atom feed
* : git tag and PV variable
@ 2016-02-24 15:29 GUEYTAT Julien
  2016-02-24 15:35 ` Khem Raj
  0 siblings, 1 reply; 6+ messages in thread
From: GUEYTAT Julien @ 2016-02-24 15:29 UTC (permalink / raw)
  To: yocto


[-- Attachment #1.1: Type: text/plain, Size: 817 bytes --]

Hi,

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 ?

Thanks for sharing!

Julien GUEYTAT
Ingénieur Informatique
[Logo CDS SOFT]
1027, avenue du Docteur Julien Lefebre BP27
06271 Villeneuve-Loubet Cedex
Fixe :  +33 (0) 492 024 545
Mob :  +33(0) 617 980 383
Fax :    +33(0) 492 024 546
Email : j.gueytat@cdssoft.studiel.fr<mailto:j.gueytat@cdssoft.studiel.fr>
www : www.studiel.fr<http://www.studiel.fr/>
P Pensez Environnement, imprimez seulement si nécessaire


[-- Attachment #1.2: Type: text/html, Size: 5558 bytes --]

[-- Attachment #2: image001.png --]
[-- Type: image/png, Size: 7552 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: : git tag and PV variable
  2016-02-24 15:29 : git tag and PV variable GUEYTAT Julien
@ 2016-02-24 15:35 ` Khem Raj
  2016-02-24 16:02   ` Alexander Kanavin
  0 siblings, 1 reply; 6+ messages in thread
From: Khem Raj @ 2016-02-24 15:35 UTC (permalink / raw)
  To: GUEYTAT Julien; +Cc: yocto


[-- Attachment #1.1: Type: text/plain, Size: 1284 bytes --]

On Wed, Feb 24, 2016 at 10:29 AM, GUEYTAT Julien <
j.gueytat@cdssoft.studiel.fr> wrote:

> Hi,
>
>
>
> 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.



>
>
> Thanks for sharing!
>
>
>
> *Julien GUEYTAT*
>
> *Ingénieur Informatique*
>
> [image: Logo CDS SOFT]
>
> 1027, avenue du Docteur Julien Lefebre BP27
>
> 06271 Villeneuve-Loubet Cedex
>
> *Fixe* :  +33 (0) 492 024 545
> *Mob* :  +33(0) 617 980 383
> *Fax* :    +33(0) 492 024 546
> *Email* : j.gueytat@cdssoft.studiel.fr
>
> *www* : www.studiel.fr
>
> *P* *Pensez Environnement, imprimez seulement si nécessaire*
>
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
>

[-- Attachment #1.2: Type: text/html, Size: 4613 bytes --]

[-- Attachment #2: image001.png --]
[-- Type: image/png, Size: 7552 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: : git tag and PV variable
  2016-02-24 15:35 ` Khem Raj
@ 2016-02-24 16:02   ` Alexander Kanavin
  2016-02-24 16:39     ` Martin Jansa
  2016-02-24 18:09     ` Maciej Borzecki
  0 siblings, 2 replies; 6+ messages in thread
From: Alexander Kanavin @ 2016-02-24 16:02 UTC (permalink / raw)
  To: yocto

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.

Alex



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: : git tag and PV variable
  2016-02-24 16:02   ` Alexander Kanavin
@ 2016-02-24 16:39     ` Martin Jansa
  2016-02-24 18:09     ` Maciej Borzecki
  1 sibling, 0 replies; 6+ messages in thread
From: Martin Jansa @ 2016-02-24 16:39 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 1349 bytes --]

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@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: : git tag and PV variable
  2016-02-24 16:02   ` Alexander Kanavin
  2016-02-24 16:39     ` Martin Jansa
@ 2016-02-24 18:09     ` Maciej Borzecki
  2016-02-25 13:19       ` GUEYTAT Julien
  1 sibling, 1 reply; 6+ messages in thread
From: Maciej Borzecki @ 2016-02-24 18:09 UTC (permalink / raw)
  To: yocto, GUEYTAT Julien


> Dnia 24 luty 2016 o 17:02 Alexander Kanavin
> <alexander.kanavin@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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: : git tag and PV variable
  2016-02-24 18:09     ` Maciej Borzecki
@ 2016-02-25 13:19       ` GUEYTAT Julien
  0 siblings, 0 replies; 6+ messages in thread
From: GUEYTAT Julien @ 2016-02-25 13:19 UTC (permalink / raw)
  To: 'Maciej Borzecki', yocto

Perfect I'll give it a try! :)

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


> Dnia 24 luty 2016 o 17:02 Alexander Kanavin 
> <alexander.kanavin@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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-02-25 13:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-24 15:29 : git tag and PV variable GUEYTAT Julien
2016-02-24 15:35 ` Khem Raj
2016-02-24 16:02   ` Alexander Kanavin
2016-02-24 16:39     ` Martin Jansa
2016-02-24 18:09     ` Maciej Borzecki
2016-02-25 13:19       ` GUEYTAT Julien

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.