]> code.ossystems Code Review - openembedded-core.git/commitdiff
license_image.bbclass: fix missing recipeinfo on self
authorMichael Ho <Michael.Ho@bmw.de>
Tue, 12 Jan 2021 08:55:33 +0000 (09:55 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 13 Jan 2021 23:12:25 +0000 (23:12 +0000)
Resolve a build bug where image recipes with a do_deploy task will fail.

If the image recipe inheriting license_image.bbclass has a deploy task, then
the function get_deployed_dependencies will add itself to the list of recipes
to get license information for.

However, image recipes don't generally deploy license info so this results in
an error.

File: '/nvme/poky/meta/classes/license_image.bbclass', lineno: 192, function: license_deployed_manifest
...
Exception: FileNotFoundError: [Errno 2] No such file or directory: '/nvme/poky/build/tmp/deploy/licenses/core-image-minimal/recipeinfo'

Add a corner case to exclude the originating image recipe from the list of
dependencies to check.

Signed-off-by: Michael Ho <Michael.Ho@bmw.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/license_image.bbclass

index 119c8dfc869bd8489aa90c45ccef93a1987e87b0..8fd88cfb2d91e77465b93dc7c67177ee15402d1b 100644 (file)
@@ -220,9 +220,10 @@ def get_deployed_dependencies(d):
     deploy = {}
     # Get all the dependencies for the current task (rootfs).
     taskdata = d.getVar("BB_TASKDEPDATA", False)
+    pn = d.getVar("PN", True)
     depends = list(set([dep[0] for dep
                     in list(taskdata.values())
-                    if not dep[0].endswith("-native")]))
+                    if not dep[0].endswith("-native") and not dep[0] == pn]))
 
     # To verify what was deployed it checks the rootfs dependencies against
     # the SSTATE_MANIFESTS for "deploy" task.