All of lore.kernel.org
 help / color / mirror / Atom feed
* extend image.bbclass (or any bbclass file)
@ 2013-07-12 11:11 Davide Soldan
  2013-07-12 11:22 ` Erik Botö
  0 siblings, 1 reply; 6+ messages in thread
From: Davide Soldan @ 2013-07-12 11:11 UTC (permalink / raw)
  To: yocto

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!


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: extend image.bbclass (or any bbclass file)
  2013-07-12 11:11 extend image.bbclass (or any bbclass file) Davide Soldan
@ 2013-07-12 11:22 ` Erik Botö
  2013-07-12 13:02   ` Davide Soldan
  0 siblings, 1 reply; 6+ messages in thread
From: Erik Botö @ 2013-07-12 11:22 UTC (permalink / raw)
  To: Davide Soldan; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 2206 bytes --]

Hi,

On Fri, Jul 12, 2013 at 1:11 PM, Davide Soldan <davide.soldan@kynetics.it>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@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>

[-- Attachment #2: Type: text/html, Size: 2917 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: extend image.bbclass (or any bbclass file)
  2013-07-12 11:22 ` Erik Botö
@ 2013-07-12 13:02   ` Davide Soldan
  0 siblings, 0 replies; 6+ messages in thread
From: Davide Soldan @ 2013-07-12 13:02 UTC (permalink / raw)
  To: Erik Botö; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 2431 bytes --]

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@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@yoctoproject.org[2]
https://lists.yoctoproject.org/listinfo/yocto[3]






--------
[1] mailto:davide.soldan@kynetics.it
[2] mailto:yocto@yoctoproject.org
[3] https://lists.yoctoproject.org/listinfo/yocto

[-- Attachment #2: Type: text/html, Size: 5892 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: extend image.bbclass (or any bbclass file)
  2013-07-12 13:35 ` Otavio Salvador
@ 2013-07-12 13:42   ` Davide Soldan
  0 siblings, 0 replies; 6+ messages in thread
From: Davide Soldan @ 2013-07-12 13:42 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: meta-freescale

Wonderful thank you!

In data venerdì 12 luglio 2013 10:35:32, Otavio Salvador ha scritto:
> On Fri, Jul 12, 2013 at 8:10 AM, Davide Soldan
> <davide.soldan@kynetics.it> 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?
> 
> Yes; you can make some extensions to it as we did in:
> 
> http://git.yoctoproject.org/cgit/cgit.cgi/meta-fsl-arm/tree/classes/image_types_fsl.bbclass
> 
> Regards,
> 
> --
> Otavio Salvador                             O.S. Systems
> http://www.ossystems.com.br        http://projetos.ossystems.com.br
> Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: extend image.bbclass (or any bbclass file)
  2013-07-12 11:10 Davide Soldan
@ 2013-07-12 13:35 ` Otavio Salvador
  2013-07-12 13:42   ` Davide Soldan
  0 siblings, 1 reply; 6+ messages in thread
From: Otavio Salvador @ 2013-07-12 13:35 UTC (permalink / raw)
  To: Davide Soldan; +Cc: meta-freescale

On Fri, Jul 12, 2013 at 8:10 AM, Davide Soldan
<davide.soldan@kynetics.it> 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?

Yes; you can make some extensions to it as we did in:

http://git.yoctoproject.org/cgit/cgit.cgi/meta-fsl-arm/tree/classes/image_types_fsl.bbclass

Regards,

--
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 6+ messages in thread

* extend image.bbclass (or any bbclass file)
@ 2013-07-12 11:10 Davide Soldan
  2013-07-12 13:35 ` Otavio Salvador
  0 siblings, 1 reply; 6+ messages in thread
From: Davide Soldan @ 2013-07-12 11:10 UTC (permalink / raw)
  To: meta-freescale

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!


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-07-12 13:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-12 11:11 extend image.bbclass (or any bbclass file) Davide Soldan
2013-07-12 11:22 ` Erik Botö
2013-07-12 13:02   ` Davide Soldan
  -- strict thread matches above, loose matches on Subject: below --
2013-07-12 11:10 Davide Soldan
2013-07-12 13:35 ` Otavio Salvador
2013-07-12 13:42   ` Davide Soldan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.