All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: Otavio Salvador <otavio@ossystems.com.br>
Cc: openembedded-devel@lists.openembedded.org
Subject: Re: [PATCH] classes/gitpv.bbclass: use 'git describe' to for package version
Date: Wed, 15 Dec 2010 20:33:39 +0100	[thread overview]
Message-ID: <20101215193339.GC3238@jama> (raw)
In-Reply-To: <AANLkTin_QS4A+UM2Oj3K82i+rtC4Qd_aD=oTDQ3iZB7q@mail.gmail.com>

On Wed, Dec 15, 2010 at 12:27:12PM -0200, Otavio Salvador wrote:
> On Wed, Dec 15, 2010 at 11:01, Martin Jansa <martin.jansa@gmail.com> wrote:
> > On Wed, Dec 15, 2010 at 10:50:25AM -0200, Otavio Salvador wrote:
> >> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> >> ---
> >>  classes/gitpv.bbclass |   41 +++++++++++++++++++++++++++++++++++++++++
> >>  1 files changed, 41 insertions(+), 0 deletions(-)
> >>  create mode 100644 classes/gitpv.bbclass
> >>
> >> diff --git a/classes/gitpv.bbclass b/classes/gitpv.bbclass
> >> new file mode 100644
> >> index 0000000..c9496f1
> >> --- /dev/null
> >> +++ b/classes/gitpv.bbclass
> >> @@ -0,0 +1,41 @@
> >> +# gitpv.bbclass provides a PV variable which is a sortable version
> >> +# with the output of "git describe".
> >> +#
> >> +# It can handle SRCREV = ${AUTOREV}, as well as SRCREV = "<hash>"
> >> +
> >> +PV = "${@get_git_pv(d)}"
> >
> > can you integrate it with
> > classes/gitpkgv.bbclass ?
> 
> I can however I think the usage is different.

I find 3 similar classes a bit confusing
gitpkgv, gitver and now gitpv

so I was hoping that all 3 classes could be merged to one (probably
gitver is best name) where all usefull variables will be prepared, and
then only the right one used in recipe.

Like in gitpkgv.bbclass example:
# inherit gitpkgv
#
# PV = "1.0+git${SRCPV}"        
# PKGV = "1.0+git${GITPKGV}"

btw there should be '+gitr' not '+git' AFAIK

in your case, you can use something like
PV = "${GITVER}"

btw your current implementation imho doesn't provide sortable version in
case someone makes tag "something-special" between tags "release-2010.12" and
"release-2011.03".

> The gitpkgv does not use describe and if there's users of it (there's
> no in recipes) we'd change it for them. That is wrong in my opinion.

agreed but it can still be in same bbclass maybe in new variable ?GITTAGVER?
as long as bbclass is not changing variables like PV (and expects recipe
to use provided variables itself).

> about assign to PV ?= I agree however why someone might want to use it
> only in PKGV?

Here is a bit longer thread with reasoning and description
http://www.mail-archive.com/openembedded-devel@lists.openembedded.org/msg06746.html

Even after converting many recipes from SRCREV to SRCPV I find this
concept nice and if local persistent cache will be still needed in new fetchers 
implementation, then we should probably convert git recipes using SRCPV to
something like GITPKGV (this time hopefully without PE bump).

Regards,

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com



  parent reply	other threads:[~2010-12-15 19:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-15 12:42 [PATCH] classes/gitpv.bbclass: use 'git describe' to for package version Otavio Salvador
2010-12-15 12:50 ` Otavio Salvador
2010-12-15 13:01   ` Martin Jansa
2010-12-15 14:27     ` Otavio Salvador
2010-12-15 16:36       ` Otavio Salvador
2010-12-15 17:18         ` Andreas Oberritter
2010-12-15 17:40           ` Otavio Salvador
2010-12-15 19:33       ` Martin Jansa [this message]
2010-12-15 21:17 ` [PATCH] classes/gitpkgv.bbclass: use 'git describe' information and simplify usage Otavio Salvador

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101215193339.GC3238@jama \
    --to=martin.jansa@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    --cc=otavio@ossystems.com.br \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.