buildhistory: Fix regex to handle versions without spaces

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.

(From OE-Core rev: 613e96b06202f31870be411ca45b44237ae55b1c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2016-02-12 11:36:13 +00:00
parent 7c3d4c033e
commit 5fc5996c23
1 changed files with 1 additions and 1 deletions

View 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)