generic-poky/bitbake/lib
Mike Looijmans f03e108fb1 bitbake: fetch2/__init__.py: Make get_srcrev output configurable
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

(Bitbake rev: 2f1f4483493cc290f5d2c07f9906e90eaea2f4c1)

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-24 07:20:56 +01:00
..
bb bitbake: fetch2/__init__.py: Make get_srcrev output configurable 2015-05-24 07:20:56 +01:00
bs4 bitbake: bs4: Add beautifulsoup 4.3.2 to assist the fetcher 2014-11-06 16:45:23 +00:00
ply Add pysh, ply, and codegen to lib/ to prepare for future work 2010-08-03 14:06:07 +01:00
prserv bitbake: prserv: serv.py: remove unused and duplicate imports 2015-05-08 17:46:36 +01:00
toaster bitbake: toaster: Remove dependency on daemon application 2015-05-19 11:58:45 +01:00
codegen.py Add pysh, ply, and codegen to lib/ to prepare for future work 2010-08-03 14:06:07 +01:00
progressbar.py bitbake: progressbar: use '/usr/bin/env' in shebangs with python 2014-11-12 15:25:17 +00:00
pyinotify.py bitbake: bitbake: Add pyinotify to lib/ 2015-01-14 11:32:02 +00:00