How inherit
works in yocto?
When to use inherit
and DEPENDS
in yocto recipes?
For example, a yocto recipe has:
inherit mono
other has:
DEPENDS = mono
inherit
is used to add class files. There are usually a lot of different things added by class files such as tasks being defined. You can see what they do by looking at the */classes/*.bbclass files in the different layers. The mono.bbclass likely does a lot more than just adding a DEPENDS
.
In basic terms, the DEPENDS
variable just says "build mono and have it available" before the current recipe builds. It won't define other interesting things the mono class does.
You'd probably want to use the class if you're writing a mono based recipe and need the task definitions and so on. The DEPENDS
is more appropriate if you just wanted mono to be available in your recipes.