On Sun, 2021-02-21 at 04:04 +0100, Ida Delphine wrote:
> About moving the functions to license.py I have some trouble importing 
> a .bbclass file to the python file. In one of the functions I made use
> of a function found in license.bbclass. Just wondering why it's better
>  to move the functions to license.py instead of leaving them at 
> license.bbclass and how I will deal with this import issue

The functions in license.py will need to be standalone, they can't easily
call code within a bblcass, only other functions within that module. That 
suggests you may need to move other functions, or maybe not move them at
all, it depends what the code is doing really.

We also need to be mindful about dependency tracking. Code in bbclass
files is scanned for variable dependencies, so a getVar("XXX") will
automatically add a dependency on XXX for the generation of task hashes.
Once the code moves to license.py, this does not happen so we have to
account for it manually if needed.

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#148394): 
https://lists.openembedded.org/g/openembedded-core/message/148394
Mute This Topic: https://lists.openembedded.org/mt/80697040/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to