]> code.ossystems Code Review - openembedded-core.git/commitdiff
toaster.bbclass: Ignore some dependencies in toaster_buildhistory_dump()
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Tue, 29 Aug 2017 21:21:05 +0000 (23:21 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 30 Aug 2017 10:19:11 +0000 (11:19 +0100)
When using RPM, depends.dot may contain dependencies such as
"/bin/sh", which will confuse _toaster_load_pkgdatafile(). Ignore
them. While at it, also ignore dependencies that contain parentheses,
e.g., "libc.so.6(GLIBC_2.7)".

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/toaster.bbclass

index fbf463bbb7043449824e468bd236c94110f0fedc..6cef0b8f6ebd9fbbe1c6a68a10938b0292b3b402 100644 (file)
@@ -279,6 +279,14 @@ python toaster_buildhistory_dump() {
                     dependsname = m.group('dep')
                     deptype = 'recommends' if m.group('rec') else 'depends'
 
+                    # If RPM is used for packaging, then there may be
+                    # dependencies such as "/bin/sh", which will confuse
+                    # _toaster_load_pkgdatafile() later on. While at it, ignore
+                    # any dependencies that contain parentheses, e.g.,
+                    # "libc.so.6(GLIBC_2.7)".
+                    if dependsname.startswith('/') or '(' in dependsname:
+                        continue
+
                     if not pname in images[target]:
                         images[target][pname] = {'size': 0, 'depends' : []}
                     if not dependsname in images[target]: