From: Adam Blank Date: Wed, 31 Dec 2025 11:21:01 +0000 (+0100) Subject: buildhistory: fix handling of RDEPENDS style strings X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b013d62d1092a5f2ed14c11d6e7bb37d74e5e6cc;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git buildhistory: fix handling of RDEPENDS style strings RDEPENDS style strings are regex searched for entries matching the usual, allowed package names (plus possible version flags). RPROVIDES however, is also allowed to contain actual file paths like '/bin/sh', which get broken by the current implementation. Use bb.utils to handle RDEPENDS style stings. Signed-off-by: Adam Blank Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index 4a380c10c6..78037a6462 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass @@ -187,10 +187,7 @@ python buildhistory_emit_pkghistory() { return None def sortpkglist(string): - pkgiter = re.finditer(r'[a-zA-Z0-9.+-]+( \([><=]+[^)]+\))?', string, 0) - pkglist = [p.group(0) for p in pkgiter] - pkglist.sort() - return ' '.join(pkglist) + return bb.utils.join_deps(bb.utils.explode_dep_versions2(string), False) def sortlist(string): items = string.split(' ')