]> code.ossystems Code Review - openembedded-core.git/commitdiff
baremetal-image: Fix do_image dependencies
authorAlejandro Hernandez Samaniego <alejandro@enedino.org>
Thu, 7 Oct 2021 08:42:05 +0000 (02:42 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 8 Oct 2021 15:43:55 +0000 (16:43 +0100)
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 <alejandro@enedino.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/baremetal-image.bbclass

index 089c44552293f8641f0dff4746bf2817ad3b314c..81f5e5e93d1d3d38a9e4e54c822a1d237dfc3a76 100644 (file)
@@ -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')) 
 }