Patchwork [1/2] Solved package namespace errors in PRS

login
register
mail settings
Submitter Emilia Ciobanu
Date Feb. 14, 2013, 3:52 p.m.
Message ID <1360857160-17509-1-git-send-email-emilia.maria.silvia.ciobanu@intel.com>
Download mbox | patch
Permalink /patch/44643/
State Accepted
Commit 444b6e1cd8f49e010560dfdb5d17c4eef03ffe9e
Headers show

Comments

Emilia Ciobanu - Feb. 14, 2013, 3:52 p.m.
For some packages PRS reported incorrect upstream version
as it was either the raw string or it mismatched some
alternative groups.

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

Patch

diff --git a/meta/classes/distrodata.bbclass b/meta/classes/distrodata.bbclass
index e25eeab..276ca03 100644
--- a/meta/classes/distrodata.bbclass
+++ b/meta/classes/distrodata.bbclass
@@ -291,8 +291,8 @@  python do_checkpkg() {
         suffix = "(tar\.gz|tgz|tar\.bz2|zip|xz|rpm|bz2|orig\.tar\.gz|tar\.xz|src\.tar\.gz|src\.tgz|svnr\d+\.tar\.bz2|stable\.tar\.gz|src\.rpm)"
 
         suffixtuple = ("tar.gz", "tgz", "zip", "tar.bz2", "tar.xz", "bz2", "orig.tar.gz", "src.tar.gz", "src.rpm", "src.tgz", "svnr\d+.tar.bz2", "stable.tar.gz", "src.rpm")
-        sinterstr = "(?P<name>%s?)v?(?P<ver>%s)(source)?" % (prefix, ver_regex)
-        sdirstr = "(?P<name>%s)\.?v?(?P<ver>%s)(source)?[\.\-](?P<type>%s$)" % (prefix, ver_regex, suffix)
+        sinterstr = "(?P<name>%s?)v?(?P<ver>%s)(\-source)?" % (prefix, ver_regex)
+        sdirstr = "(?P<name>%s)\.?v?(?P<ver>%s)(\-source)?[\.\-](?P<type>%s$)" % (prefix, ver_regex, suffix)
 
         def parse_inter(s):
                 m = re.search(sinterstr, s)
@@ -504,7 +504,7 @@  python do_checkpkg() {
                                 status = "ErrParseDir"
                         else:
                                 """newver still contains a full package name string"""
-                                status = newver[1]
+                                status = re.sub('_', '.', newver[1])
                 elif not len(fhtml):
                         status = "ErrHostNoDir"