[oe-commits] Robert Yang : image.bbclass: image_types.bbclass is a must

git at git.openembedded.org git at git.openembedded.org
Thu Aug 14 22:09:34 UTC 2014


Module: openembedded-core.git
Branch: master-next
Commit: 0a7d079da0b0d94d8c8ec4f4660916856248d9b1
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=0a7d079da0b0d94d8c8ec4f4660916856248d9b1

Author: Robert Yang <liezhi.yang at windriver.com>
Date:   Mon Aug 11 23:08:11 2014 -0700

image.bbclass: image_types.bbclass is a must

The image_types.bbclass is a must since we use this in image.bbclass:

[snip]
python () {
    deps = " " + imagetypes_getdepends(d)
    d.appendVarFlag('do_rootfs', 'depends', deps)
[snip]

The imagetypes_getdepends() is defined in image_types.bbclass. Use "+="
to replace "?=" since it is a must, so that the user can use
"IMAGE_CLASSES = foo.bbclass" in local.conf to add their own image
class.

NOTE: the IMAGE_CLASSES_append = " foo" doesn't work since we use this
in image.bbclass:
 IMAGE_CLASSES += "image_types"
 inherit ${IMAGE_CLASSES}

I think that it is because inherit takes effect before append?

Another way to fix the problem is:
IMAGE_CLASSES ?= ""
inherit image_types ${IMAGE_CLASSES}

But it seems that we need another name for IMAGE_CLASSES, for example
IMAGE_CLASSES_EXTRA, and also need update the doc, which would make it
complicated.

Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/image.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 82605f2..940bdb6 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -163,7 +163,7 @@ python () {
         d.appendVarFlag('do_bundle_initramfs', 'depends', " %s:do_rootfs" % initramfs_image)
 }
 
-IMAGE_CLASSES ?= "image_types"
+IMAGE_CLASSES += "image_types"
 inherit ${IMAGE_CLASSES}
 
 IMAGE_POSTPROCESS_COMMAND ?= ""



More information about the Openembedded-commits mailing list