aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/recipeutils.py
diff options
context:
space:
mode:
authorAníbal Limón <anibal.limon@linux.intel.com>2015-07-14 19:43:56 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-22 08:16:15 +0100
commit7ede979950fd265026c74526d8448627fd0a8c08 (patch)
tree20218f93d087911cc40083e4b80f3b604b0bb4bc /meta/lib/oe/recipeutils.py
parent382833cc7e7603241838e18e429f69da0c2ee4ac (diff)
downloadopenembedded-core-7ede979950fd265026c74526d8448627fd0a8c08.tar.gz
oe/recipeutils.py: get_recipe_upstream_info update to get revision
Bitbake fetcher latest_versionstring now returns a tuple with (version, revision) that helps SCM's like git to build current upstream version. [YOCTO #7605] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/recipeutils.py')
-rw-r--r--meta/lib/oe/recipeutils.py28
1 files changed, 15 insertions, 13 deletions
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index 16530ee179..83923e9961 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -704,28 +704,30 @@ def get_recipe_upstream_version(rd):
else:
ud = bb.fetch2.FetchData(src_uri, rd)
pupver = ud.method.latest_versionstring(ud, rd)
+ (upversion, revision) = pupver
+ # format git version version+gitAUTOINC+HASH
if uri_type == 'git':
(pv, pfx, sfx) = get_recipe_pv_without_srcpv(pv, uri_type)
- revision = ud.method.latest_revision(ud, rd, ud.names[0])
+ # if contains revision but not upversion use current pv
+ if upversion == '' and revision:
+ upversion = pv
- # if contains revision but not pupver use current pv
- if pupver == '' and revision:
- pupver = pv
-
- if pupver != '':
- tmp = pupver
- pupver = ''
+ if upversion:
+ tmp = upversion
+ upversion = ''
if pfx:
- pupver = pfx
- pupver = pupver + tmp
+ upversion = pfx + tmp
+ else:
+ upversion = tmp
+
if sfx:
- pupver = pupver + sfx + revision[:10]
+ upversion = upversion + sfx + revision[:10]
- if pupver != '':
- ru['version'] = pupver
+ if upversion:
+ ru['version'] = upversion
ru['type'] = 'A'
ru['datetime'] = datetime.now()