mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +00:00
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] (From OE-Core rev: 7ede979950fd265026c74526d8448627fd0a8c08) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
e28c1eb708
commit
74240ccbfa
+16
-14
@@ -704,28 +704,30 @@ def get_recipe_upstream_version(rd):
|
|||||||
else:
|
else:
|
||||||
ud = bb.fetch2.FetchData(src_uri, rd)
|
ud = bb.fetch2.FetchData(src_uri, rd)
|
||||||
pupver = ud.method.latest_versionstring(ud, rd)
|
pupver = ud.method.latest_versionstring(ud, rd)
|
||||||
|
(upversion, revision) = pupver
|
||||||
|
|
||||||
|
# format git version version+gitAUTOINC+HASH
|
||||||
if uri_type == 'git':
|
if uri_type == 'git':
|
||||||
(pv, pfx, sfx) = get_recipe_pv_without_srcpv(pv, uri_type)
|
(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 upversion:
|
||||||
if pupver == '' and revision:
|
tmp = upversion
|
||||||
pupver = pv
|
upversion = ''
|
||||||
|
|
||||||
if pupver != '':
|
|
||||||
tmp = pupver
|
|
||||||
pupver = ''
|
|
||||||
|
|
||||||
if pfx:
|
if pfx:
|
||||||
pupver = pfx
|
upversion = pfx + tmp
|
||||||
pupver = pupver + tmp
|
else:
|
||||||
if sfx:
|
upversion = tmp
|
||||||
pupver = pupver + sfx + revision[:10]
|
|
||||||
|
|
||||||
if pupver != '':
|
if sfx:
|
||||||
ru['version'] = pupver
|
upversion = upversion + sfx + revision[:10]
|
||||||
|
|
||||||
|
if upversion:
|
||||||
|
ru['version'] = upversion
|
||||||
ru['type'] = 'A'
|
ru['type'] = 'A'
|
||||||
|
|
||||||
ru['datetime'] = datetime.now()
|
ru['datetime'] = datetime.now()
|
||||||
|
|||||||
Reference in New Issue
Block a user