All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] distrodata: added some corner cases for svn and git repos
@ 2013-02-26 13:35 Emilia Ciobanu
  0 siblings, 0 replies; only message in thread
From: Emilia Ciobanu @ 2013-02-26 13:35 UTC (permalink / raw)
  To: openembedded-core

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.

Signed-off-by: Emilia Ciobanu <emilia.maria.silvia.ciobanu@intel.com>
---
 meta/classes/distrodata.bbclass |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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]
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-02-26 13:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-26 13:35 [PATCH] distrodata: added some corner cases for svn and git repos Emilia Ciobanu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.