]> code.ossystems Code Review - openembedded-core.git/commitdiff
buildhistory: Fix regex to handle versions without spaces
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 12 Feb 2016 11:36:13 +0000 (11:36 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 13 Feb 2016 08:27:17 +0000 (08:27 +0000)
Its valid to have dependencies like XXX (=2.1) without spaces, as injected
by debian.bbclass. The code was breaking these into separate components
and destroying them so improve the regex to handle them.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/buildhistory.bbclass

index 3c4647ac7b0adb3dd89b66648fb05efa794830df..a5a85ff4fc10fdd23c283726edc8c92b91819ff2 100644 (file)
@@ -145,7 +145,7 @@ python buildhistory_emit_pkghistory() {
             return None
 
     def sortpkglist(string):
-        pkgiter = re.finditer(r'[a-zA-Z0-9.+-]+( \([><=]+ [^ )]+\))?', string, 0)
+        pkgiter = re.finditer(r'[a-zA-Z0-9.+-]+( \([><=]+[^)]+\))?', string, 0)
         pkglist = [p.group(0) for p in pkgiter]
         pkglist.sort()
         return ' '.join(pkglist)