From: "Aníbal Limón" <anibal.limon@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 1/2] oe/recipeutils.py: get_recipe_upstream_info update to get revision
Date: Tue, 14 Jul 2015 19:33:09 -0500 [thread overview]
Message-ID: <1436920390-32074-2-git-send-email-anibal.limon@linux.intel.com> (raw)
In-Reply-To: <1436920390-32074-1-git-send-email-anibal.limon@linux.intel.com>
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>
---
meta/lib/oe/recipeutils.py | 28 +++++++++++++++-------------
1 file changed, 15 insertions(+), 13 deletions(-)
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index ab50686..f3da864 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -703,28 +703,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()
--
1.9.1
next prev parent reply other threads:[~2015-07-15 0:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-15 0:33 [PATCH 0/2] oe/recipeutils.py: get_recipe_upstream_info improvements Aníbal Limón
2015-07-15 0:33 ` Aníbal Limón [this message]
2015-07-15 0:33 ` [PATCH 2/2] recipeutils.py: get_recipe_pv_without_srcpv remove prefixes from pv Aníbal Limón
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1436920390-32074-2-git-send-email-anibal.limon@linux.intel.com \
--to=anibal.limon@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox