[OE-core] [PATCH 7/7] recipeutils.py: allow all characters in regexes used to parse version strings

2015-08-07 Thread Alexander Kanavin
Previously only numeric characters were matches and anything else was
discarded, so 4.0-rc3, 2005e, 1.0.2a and similar versions got truncated.

Signed-off-by: Alexander Kanavin 
---
 meta/lib/oe/recipeutils.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index 9d45b42..cd74213 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -638,7 +638,7 @@ def get_recipe_pv_without_srcpv(pv, uri_type):
 sfx = ''
 
 if uri_type == 'git':
-git_regex = 
re.compile("(?P(v|))(?P((\d+[\.\-_]*)+))(?P(\+|)(git|)(r|)(AUTOINC|)(\+|))(?P.*)")
+git_regex = 
re.compile("(?Pv?)(?P[^\+]*)((?P\+(git)?r?(AUTOINC\+))(?P.*))?")
 m = git_regex.match(pv)
 
 if m:
@@ -646,7 +646,7 @@ def get_recipe_pv_without_srcpv(pv, uri_type):
 pfx = m.group('pfx')
 sfx = m.group('sfx')
 else:
-regex = re.compile("(?P(v|r|))(?P((\d+[\.\-_]*)+))")
+regex = re.compile("(?P(v|r)?)(?P.*)")
 m = regex.match(pv)
 if m:
 pv = m.group('ver')
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 7/7] recipeutils.py: allow all characters in regexes used to parse version strings

2015-08-03 Thread Alexander Kanavin
Previously only numeric characters were matches and anything else was
discarded, so 4.0-rc3, 2005e, 1.0.2a and similar versions got truncated.

Signed-off-by: Alexander Kanavin 
---
 meta/lib/oe/recipeutils.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index 9d45b42..cd74213 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -638,7 +638,7 @@ def get_recipe_pv_without_srcpv(pv, uri_type):
 sfx = ''
 
 if uri_type == 'git':
-git_regex = 
re.compile("(?P(v|))(?P((\d+[\.\-_]*)+))(?P(\+|)(git|)(r|)(AUTOINC|)(\+|))(?P.*)")
+git_regex = 
re.compile("(?Pv?)(?P[^\+]*)((?P\+(git)?r?(AUTOINC\+))(?P.*))?")
 m = git_regex.match(pv)
 
 if m:
@@ -646,7 +646,7 @@ def get_recipe_pv_without_srcpv(pv, uri_type):
 pfx = m.group('pfx')
 sfx = m.group('sfx')
 else:
-regex = re.compile("(?P(v|r|))(?P((\d+[\.\-_]*)+))")
+regex = re.compile("(?P(v|r)?)(?P.*)")
 m = regex.match(pv)
 if m:
 pv = m.group('ver')
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core