From: "Aníbal Limón" <anibal.limon@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCHv2 1/3] oe/recipeutils.py: get_recipe_upstream_info only use sfx and pfx when exits
Date: Tue, 14 Jul 2015 19:43:55 -0500 [thread overview]
Message-ID: <1436921037-32378-2-git-send-email-anibal.limon@linux.intel.com> (raw)
In-Reply-To: <1436921037-32378-1-git-send-email-anibal.limon@linux.intel.com>
Don't use pfx and sfx when not exist because cause formatting errors
like 2.9HASH instead of 2.9+gitAUTOINC+HASH.
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
meta/lib/oe/recipeutils.py | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index bd812cc..ab50686 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -707,14 +707,21 @@ def get_recipe_upstream_version(rd):
if uri_type == 'git':
(pv, pfx, sfx) = get_recipe_pv_without_srcpv(pv, uri_type)
- latest_revision = ud.method.latest_revision(ud, rd, ud.names[0])
+ revision = ud.method.latest_revision(ud, rd, ud.names[0])
# if contains revision but not pupver use current pv
- if pupver == '' and latest_revision:
+ if pupver == '' and revision:
pupver = pv
if pupver != '':
- pupver = pfx + pupver + sfx + latest_revision[:10]
+ tmp = pupver
+ pupver = ''
+
+ if pfx:
+ pupver = pfx
+ pupver = pupver + tmp
+ if sfx:
+ pupver = pupver + sfx + revision[:10]
if pupver != '':
ru['version'] = pupver
--
1.9.1
next prev parent reply other threads:[~2015-07-15 0:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-15 0:43 [PATCHv2 0/3] oe/recipeutils.py: get_recipe_upstream_info improvements Aníbal Limón
2015-07-15 0:43 ` Aníbal Limón [this message]
2015-07-15 0:43 ` [PATCHv2 2/3] oe/recipeutils.py: get_recipe_upstream_info update to get revision Aníbal Limón
2015-07-15 0:43 ` [PATCHv2 3/3] recipeutils.py: get_recipe_pv_without_srcpv remove prefixes from pv Aníbal Limón
2015-07-20 19:19 ` [PATCHv2 0/3] oe/recipeutils.py: get_recipe_upstream_info improvements 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=1436921037-32378-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