[oe-commits] =?UTF-8?Q?An=C3=ADbal=20Lim=C3=B3n=20?=: oe/recipeutils.py: get_recipe_upstream_info only use sfx and pfx when exits
git at git.openembedded.org
git at git.openembedded.org
Wed Jul 22 07:24:54 UTC 2015
Module: openembedded-core.git
Branch: master-next
Commit: 382833cc7e7603241838e18e429f69da0c2ee4ac
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=382833cc7e7603241838e18e429f69da0c2ee4ac
Author: Aníbal Limón <anibal.limon at linux.intel.com>
Date: Tue Jul 14 19:43:55 2015 -0500
oe/recipeutils.py: get_recipe_upstream_info only use sfx and pfx when exits
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 at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
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 78d6926..16530ee 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -708,14 +708,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
More information about the Openembedded-commits
mailing list