[OE-core] [PATCH] buildhistory: Fix regex to handle versions without spaces

Richard Purdie richard.purdie at linuxfoundation.org
Fri Feb 12 11:36:13 UTC 2016


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 at linuxfoundation.org>

diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 32e096b..52a5f31 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -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)





More information about the Openembedded-core mailing list