Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Mike Looijmans <mike.looijmans@topic.nl>
To: Otavio Salvador <otavio@ossystems.com.br>
Cc: Mike Looijmans <milo-software@users.sourceforge.net>,
	Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 1/2] fetch2/__init__.py: Make get_srcrev output configurable
Date: Tue, 3 Feb 2015 07:17:53 +0100	[thread overview]
Message-ID: <54D06811.3000803@topic.nl> (raw)
In-Reply-To: <CAP9ODKrsWm4CiaYmP5UJOa_9jm9F+rRNnPTWWe_WXfLXRKrOiA@mail.gmail.com>

On 02-02-15 21:50, Otavio Salvador wrote:
> On Sat, Jan 31, 2015 at 12:06 PM, Mike Looijmans
> <mike.looijmans@topic.nl> wrote:
>> From: Mike Looijmans <milo-software@users.sourceforge.net>
>>
>> The idea here is to support package version numbering similar to gitpkgv in
>> meta-openembedded. This commit is the first step towards such functionality.
>>
>> The original plan was to add a "get_pretty_srcrev" method to the fetcher, as
>> per Richard's suggestion [1]. While writing this, I noticed that it would
>> become a copy of get_srcrev with only two lines changed. So to create something
>> more Pythonic than a boolean argument and conditionals around the calls to the
>> fetcher's sortable_revision, I just made the method to be called on the fetcher
>> an argument to the method. Defaulting to 'sortable_revision' prevents affecting
>> existing code.
>>
>> Now if the git fetcher were to implement, say 'gitpkgv_revision' one could
>> set the following in a recipe:
>>    PKGV="1.2+${@bb.fetch2.get_srcrev(d, 'gitpkgv_revision')}"
>> and this would yield the same result as gitpkgv's GITPKGV variable.
>>
>> See for the discussion leading to this change:
>> [1] http://lists.openembedded.org/pipermail/openembedded-core/2015-January/100345.html
>>
>> Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
>
> I do enjoyed all the design but the way to set the PKGV.
>
> Maybe we could have a way to do it more transparently? Any idea how?

Just setting GITPKGV="${@bb.fetch2.get_srcrev(d, 'gitpkgv_revision')}" 
globally (bitbake.conf for example) would basically mimic the gitpkgv syntax, 
then a recipe would just say:

PKGV="1.2+${GITPKGV}"

Without the need to inherit gitpkgv.

Mike.


Met vriendelijke groet / kind regards,

Mike Looijmans
System Expert


TOPIC Embedded Systems
Eindhovenseweg 32-C, NL-5683 KH Best
Postbus 440, NL-5680 AK Best
Telefoon: (+31) (0) 499 33 69 79
Telefax:  (+31) (0) 499 33 69 70
E-mail: mike.looijmans@topic.nl
Website: www.topic.nl

Please consider the environment before printing this e-mail

Visit us at Embedded World 2015 Nuernberg, 24.02.2015 till 26.02.2015, Hall 1, stand number 136.
https://www.embedded-world.de/de/ausstellerprodukte/?focus=edb3exhibitor&focus2=14017667&focus3=embwld15&highlight=topic



  reply	other threads:[~2015-02-03  6:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-31 14:06 [PATCH 0/2] RFC: Integrating gitpkgv functionality Mike Looijmans
2015-01-31 14:06 ` [PATCH 1/2] fetch2/__init__.py: Make get_srcrev output configurable Mike Looijmans
2015-02-02 20:50   ` Otavio Salvador
2015-02-03  6:17     ` Mike Looijmans [this message]
2015-02-03 11:00       ` Otavio Salvador
2015-01-31 14:06 ` [PATCH 2/2] fetch2/git.py: Add gitpkgv_revision alternative version information Mike Looijmans
2015-03-08 12:29 ` [PATCH 0/2] RFC: Integrating gitpkgv functionality Mike Looijmans

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=54D06811.3000803@topic.nl \
    --to=mike.looijmans@topic.nl \
    --cc=milo-software@users.sourceforge.net \
    --cc=openembedded-core@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox