| Message ID | 20251231-buildhistory-fix-sortpkglist-v1-1-7737a3232be4@gmail.com |
|---|---|
| State | Under Review |
| Headers | show |
| Series | [RESEND] buildhistory: fix handling of RDEPENDS style strings | expand |
Hello, I could see this patch making its way up to master-next of openembedded-core on January 8th, but now it's gone... Is there a problem with it? Thanks, Adam On Wed, 31 Dec 2025 at 12:21, Adam Blank <adam.blank.g@gmail.com> wrote: > 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> > --- > meta/classes/buildhistory.bbclass | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > 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(' ') > > --- > base-commit: 2e10e9a50f12d5de3d22fbed59b65461afa3fa84 > change-id: 20251217-buildhistory-fix-sortpkglist-8adbcccffc7e > > Best regards, > -- > Adam Blank <adam.blank.g@gmail.com> > >
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(' ')
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> --- meta/classes/buildhistory.bbclass | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- base-commit: 2e10e9a50f12d5de3d22fbed59b65461afa3fa84 change-id: 20251217-buildhistory-fix-sortpkglist-8adbcccffc7e Best regards,