Skip to contentSkip to conversation

image.bbclass: let do_image depend on do_populate_lic of EXTRA_IMAGEDEPENDS

PATCH In review [email protected] 1 participant 2 messages Sep 26, 2017 – Oct 12, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 image.bbclass: let do_image depend on do_populate_lic of EXTRA_IMAGEDEPENDS

From: Ming Liu <[email protected]>

The licenses of EXTRA_IMAGEDEPENDS recipes are being referenced in image postcommand write_deploy_manifest, but a dependency is missing between do_image and do_populate_lic of EXTRA_IMAGEDEPENDS recipes, this leads some license files not present when write_deploy_manifest runs, hence will cause build errors.

Fixed by letting do_image depend on do_populate_lic of EXTRA_IMAGEDEPENDS recipes.

---
 meta/classes/image.bbclass | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
meta/classes/image.bbclass +9 -5
index 0d14250..6bc4f04 100644
@@ -145,14 +145,18 @@ IMAGE_TYPE_wic = "image_types_wic"
 inherit ${IMAGE_TYPE_wic}
 
 python () {
+    def extraimage_getdepends(task):
+        deps = ""
+        for dep in (d.getVar('EXTRA_IMAGEDEPENDS') or "").split():
+            deps += " %s:%s" % (dep, task)
+        return deps
+
+    d.appendVarFlag('do_image', 'depends', extraimage_getdepends('do_populate_lic'))
+    d.appendVarFlag('do_image_complete', 'depends', extraimage_getdepends('do_populate_sysroot'))
+
     deps = " " + imagetypes_getdepends(d)
     d.appendVarFlag('do_rootfs', 'depends', deps)
 
-    deps = ""
-    for dep in (d.getVar('EXTRA_IMAGEDEPENDS') or "").split():
-        deps += " %s:do_populate_sysroot" % dep
-    d.appendVarFlag('do_image_complete', 'depends', deps)
-
     #process IMAGE_FEATURES, we must do this before runtime_mapping_rename
     #Check for replaces image features
     features = set(oe.data.typed_value('IMAGE_FEATURES', d))
Signature · 1 line
2.7.4
author
#1 lore raw

Ping, hi, maintainers, this issue is blocking our release, please kindly help me review it and let me know if you think it's not correct.

//Ming Liu

2017-09-26 14:31 GMT+02:00 <[email protected]>:

Quoted 50 lines

From: Ming Liu <[email protected]>

The licenses of EXTRA_IMAGEDEPENDS recipes are being referenced in image postcommand write_deploy_manifest, but a dependency is missing between do_image and do_populate_lic of EXTRA_IMAGEDEPENDS recipes, this leads some license files not present when write_deploy_manifest runs, hence will cause build errors.

Fixed by letting do_image depend on do_populate_lic of EXTRA_IMAGEDEPENDS recipes.

---
 meta/classes/image.bbclass | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
meta/classes/image.bbclass +9 -5
index 0d14250..6bc4f04 100644
@@ -145,14 +145,18 @@ IMAGE_TYPE_wic = "image_types_wic"
 inherit ${IMAGE_TYPE_wic}
 
 python () {
+    def extraimage_getdepends(task):
+        deps = ""
+        for dep in (d.getVar('EXTRA_IMAGEDEPENDS') or "").split():
+            deps += " %s:%s" % (dep, task)
+        return deps
+
+    d.appendVarFlag('do_image', 'depends', extraimage_getdepends('do_
 populate_lic'))
+    d.appendVarFlag('do_image_complete', 'depends',
 extraimage_getdepends('do_populate_sysroot'))
+
     deps = " " + imagetypes_getdepends(d)
     d.appendVarFlag('do_rootfs', 'depends', deps)
 
-    deps = ""
-    for dep in (d.getVar('EXTRA_IMAGEDEPENDS') or "").split():
-        deps += " %s:do_populate_sysroot" % dep
-    d.appendVarFlag('do_image_complete', 'depends', deps)
-
     #process IMAGE_FEATURES, we must do this before runtime_mapping_rename

#Check for replaces image features
features = set(oe.data.typed_value('IMAGE_FEATURES', d))
--
2.7.4