[bitbake-devel] Get package inheritance

Paul Eggleton paul.eggleton at linux.intel.com
Fri Jul 31 10:33:52 UTC 2015


Hi Roman,

On Wednesday 29 July 2015 18:34:15 Roman Savchenko wrote:
> how can I get package inheritance?
> 
> Example what I want:
> 
> my_package.bb
> inherit A // can't be changed
> inherit B
> Inherit C
> 
> C.bbclass
> 
> python do_some_stuff() {
>     bases = d.getVar("INHERIT")
>     if "A" in bases:
>          do_some_stuff_for_a()
>     else if "B":
>          //
>     else if "A" and "B"
> }
> 
> addtask do_some_stuff

I think you want bb.data.inherits_class('classname', d) - returns True if the 
specified classname is inherited by the recipe.

Cheers,
Paul


-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the bitbake-devel mailing list