]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
buildhistory: fix handling of RDEPENDS style strings
authorAdam Blank <adam.blank.g@gmail.com>
Wed, 31 Dec 2025 11:21:01 +0000 (12:21 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 19 Jan 2026 17:46:18 +0000 (17:46 +0000)
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 <adam.blank.g@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/buildhistory.bbclass

index 4a380c10c6db263625eab63c0e77c70ffb816c76..78037a64622b411f9fe639050250de79bdac7574 100644 (file)
@@ -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(' ')