diff options
author | Aníbal Limón <anibal.limon@linux.intel.com> | 2015-07-14 19:43:56 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-23 08:48:37 +0100 |
commit | 74240ccbfac1a0166d26045ecebae2f0a767d57d (patch) | |
tree | d780345671aac61fc5ae8be155734c46d5c85673 /meta/lib | |
parent | e28c1eb70886248f3ea5407ab0ecbbfde78e41ff (diff) | |
download | poky-74240ccbfac1a0166d26045ecebae2f0a767d57d.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]
(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>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oe/recipeutils.py | 28 |
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): | |||
704 | else: | 704 | else: |
705 | ud = bb.fetch2.FetchData(src_uri, rd) | 705 | ud = bb.fetch2.FetchData(src_uri, rd) |
706 | pupver = ud.method.latest_versionstring(ud, rd) | 706 | pupver = ud.method.latest_versionstring(ud, rd) |
707 | (upversion, revision) = pupver | ||
707 | 708 | ||
709 | # format git version version+gitAUTOINC+HASH | ||
708 | if uri_type == 'git': | 710 | if uri_type == 'git': |
709 | (pv, pfx, sfx) = get_recipe_pv_without_srcpv(pv, uri_type) | 711 | (pv, pfx, sfx) = get_recipe_pv_without_srcpv(pv, uri_type) |
710 | 712 | ||
711 | revision = ud.method.latest_revision(ud, rd, ud.names[0]) | 713 | # if contains revision but not upversion use current pv |
714 | if upversion == '' and revision: | ||
715 | upversion = pv | ||
712 | 716 | ||
713 | # if contains revision but not pupver use current pv | 717 | if upversion: |
714 | if pupver == '' and revision: | 718 | tmp = upversion |
715 | pupver = pv | 719 | upversion = '' |
716 | |||
717 | if pupver != '': | ||
718 | tmp = pupver | ||
719 | pupver = '' | ||
720 | 720 | ||
721 | if pfx: | 721 | if pfx: |
722 | pupver = pfx | 722 | upversion = pfx + tmp |
723 | pupver = pupver + tmp | 723 | else: |
724 | upversion = tmp | ||
725 | |||
724 | if sfx: | 726 | if sfx: |
725 | pupver = pupver + sfx + revision[:10] | 727 | upversion = upversion + sfx + revision[:10] |
726 | 728 | ||
727 | if pupver != '': | 729 | if upversion: |
728 | ru['version'] = pupver | 730 | ru['version'] = upversion |
729 | ru['type'] = 'A' | 731 | ru['type'] = 'A' |
730 | 732 | ||
731 | ru['datetime'] = datetime.now() | 733 | ru['datetime'] = datetime.now() |