From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mail.openembedded.org (Postfix) with ESMTP id BAB25607A5 for ; Wed, 15 Jul 2015 00:43:59 +0000 (UTC) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 14 Jul 2015 17:43:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,476,1432623600"; d="scan'208";a="606330206" Received: from alimon-thinkpad-w540.zpn.intel.com ([10.219.5.54]) by orsmga003.jf.intel.com with ESMTP; 14 Jul 2015 17:43:59 -0700 From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= To: openembedded-core@lists.openembedded.org Date: Tue, 14 Jul 2015 19:43:55 -0500 Message-Id: <1436921037-32378-2-git-send-email-anibal.limon@linux.intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1436921037-32378-1-git-send-email-anibal.limon@linux.intel.com> References: <1436921037-32378-1-git-send-email-anibal.limon@linux.intel.com> MIME-Version: 1.0 Subject: [PATCHv2 1/3] oe/recipeutils.py: get_recipe_upstream_info only use sfx and pfx when exits X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2015 00:44:03 -0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- 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