[PATCH] baremetal-image: Fix do_image dependencies

DORMANTno replies

From: Alejandro Enedino Hernandez Samaniego <hidden>
Date: 2021-10-07 08:42:14
Subsystem: the rest · Maintainer: Linus Torvalds

Commit 282d596b8 added a fix for image.bbclass related to QEMU
dependencies, such fix made the older logic borrowed from
image.bbclass incompatible.

Update the dependency logic to reflect new changes, we no longer
need to add the do_addto_recipe_sysroot dependency specifically.

Signed-off-by: Alejandro Enedino Hernandez Samaniego <redacted>
---
 meta/classes/baremetal-image.bbclass | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/meta/classes/baremetal-image.bbclass b/meta/classes/baremetal-image.bbclass
index 089c445522..81f5e5e93d 100644
--- a/meta/classes/baremetal-image.bbclass
+++ b/meta/classes/baremetal-image.bbclass
@@ -105,13 +105,17 @@ inherit qemuboot
 python(){
     # do_addto_recipe_sysroot doesnt exist for all recipes, but we need it to have
     # /usr/bin on recipe-sysroot (qemu) populated
+    # The do_addto_recipe_sysroot dependency is coming from EXTRA_IMAGDEPENDS now,
+    # we just need to add the logic to add its dependency to do_image.
     def extraimage_getdepends(task):
         deps = ""
         for dep in (d.getVar('EXTRA_IMAGEDEPENDS') or "").split():
         # Make sure we only add it for qemu
             if 'qemu' in dep:
-                deps += " %s:%s" % (dep, task)
+                if ":" in dep:
+                    deps += " %s " % (dep)
+                else:
+                    deps += " %s:%s" % (dep, task)
         return deps
-    d.appendVarFlag('do_image', 'depends', extraimage_getdepends('do_addto_recipe_sysroot'))
-    d.appendVarFlag('do_image', 'depends', extraimage_getdepends('do_populate_sysroot'))
+    d.appendVarFlag('do_image', 'depends', extraimage_getdepends('do_populate_sysroot')) 
 }
-- 
2.25.1

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help