From: Emilia Ciobanu Date: Tue, 26 Feb 2013 13:35:14 +0000 (+0200) Subject: distrodata: added some corner cases for svn and git repos X-Git-Tag: rev_ivi_2015_02_04~13581 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=96696ca47c8eb5372740ac186ba54a7f8a17b094;p=scm%2Fbb%2Ftizen-distro.git distrodata: added some corner cases for svn and git repos distrodata.bbclass: git tags can include only one digit, therefore the regex that matches the latest version should also include this case. For some svn repos, using the http protocol than using the svn protocol to get infomation about revisions works better. (From OE-Core rev: bbf09cc0abbc81419349f2af1bc1196a868b2269) Signed-off-by: Emilia Ciobanu Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- diff --git a/meta/classes/distrodata.bbclass b/meta/classes/distrodata.bbclass index 276ca03..bd3a6a9 100644 --- a/meta/classes/distrodata.bbclass +++ b/meta/classes/distrodata.bbclass @@ -674,7 +674,7 @@ python do_checkpkg() { if len(line)==0: break; puptag = line.split("/")[-1] - puptag = re.search("[0-9][0-9|\.|_]+[0-9]", puptag) + puptag = re.search("([0-9][\.|_]?)+", puptag) if puptag == None: continue; puptag = puptag.group() @@ -714,6 +714,10 @@ python do_checkpkg() { svncmd = "svn info %s %s://%s%s/%s/ 2>&1" % (" ".join(options), svnproto, host, path, parm["module"]) print svncmd svninfo = os.popen(svncmd).read() + if "Can't connect to host " in svninfo or "Connection timed out" in svninfo: + svncmd = "svn info %s %s://%s%s/%s/ 2>&1" % (" ".join(options), "http", + host, path, parm["module"]) + svninfo = os.popen(svncmd).read() for line in svninfo.split("\n"): if re.search("^Last Changed Rev:", line): pupver = line.split(" ")[-1]