Skip to contentSkip to conversation

baremetal-image: Fix do_image dependencies

PATCH New Alejandro Enedino Hernandez Samaniego 1 participant 1 message Oct 7, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 baremetal-image: Fix do_image dependencies

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.

---
 meta/classes/baremetal-image.bbclass | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
meta/classes/baremetal-image.bbclass +7 -3
index 089c445522..81f5e5e93d 100644
@@ -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')) 
 }
Signature · 1 line
2.25.1