On 02-02-15 21:50, Otavio Salvador wrote:
On Sat, Jan 31, 2015 at 12:06 PM, Mike Looijmans
<mike.looijm...@topic.nl> wrote:
From: Mike Looijmans <milo-softw...@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.looijm...@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.looijm...@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

--
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to