[yocto] extend image.bbclass (or any bbclass file)

Davide Soldan davide.soldan at kynetics.it
Fri Jul 12 06:02:27 PDT 2013


Really simple!!!
Excuse me for the dumb question and thanks a lot!
Cheers
Davide
In data venerdì 12 luglio 2013 13:22:32, Erik Botö ha scritto:


Hi, 


On Fri, Jul 12, 2013 at 1:11 PM, Davide Soldan <davide.soldan at kynetics.it[1]> wrote:


Hi to all,I'm trying to move, from outside to inside my recipes, all the changes I've done for my custom image.For example I changed the image.bbclass adding a function. But this file is outside of my recipes that are stored under my git repository. So I'd like to move this function from image.bbclass to another bbclass file under mi recipes directory.I tried to copy image.bbclass under my recipes directory, change its name, and references correctly, but duplicates functions gave me some errors:

ERROR: The function normal_groups defined in image.bbclass was already declared in image-custom.bbclass. BitBake has a global python function namespace so shared functions should be declared in a common include file rather than being duplicated, or if the functions are different, please use different function names.ERROR: The function complementary_globs defined in image.bbclass was already declared in image-custom.bbclass. BitBake has a global python function namespace so shared functions should be declared in a common include file rather than being duplicated, or if the functions are different, please use different function names.ERROR: The function get_devtable_list defined in image.bbclass was already declared in image-custom.bbclass. BitBake has a global python function namespace so shared functions should be declared in a common include file rather than being duplicated, or if the functions are different, please use different function names.

So I think there should be a way to append some code to image.bbclass as I can do with recipes and bbappend files...right? How I can do that? Or maybe there's another and better way to do that?Thanks to all!




Can't your image-custom.bbclass inherit image.bbclass and then just add the function you've added? Instead of replicating all stuff from image.bbclass in your class.


Cheers, 
Erik


 
_______________________________________________


yocto mailing list

yocto at yoctoproject.org[2]
https://lists.yoctoproject.org/listinfo/yocto[3]






--------
[1] mailto:davide.soldan at kynetics.it
[2] mailto:yocto at yoctoproject.org
[3] https://lists.yoctoproject.org/listinfo/yocto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20130712/5dcc4622/attachment.html>


More information about the yocto mailing list