Dependencies

In order to accomplish the dependency, the recipes must declare what dependencies they need to have available during the build process. BitBake ensures that the build-time dependencies are satisfied before starting to build the recipe. This is easier to understand if we think about an application that uses a library. So, this library must be built and its headers must be made available for use before the application itself can be built. The DEPENDS variable is used in a recipe to inform BitBake about the build-time dependency and we should list another recipe.

When an application depends on something to run, it is called a runtime dependency. This is common for shared data among applications (for example, icons) that is used only when running the application or when an application calls another application during its execution that is not used during its build process. The runtime dependencies can be expressed using the RDEPENDS variable in a recipe. However, as those are meant to express runtime requirements, we should list package names here. In Chapter 6, Assimilating Packaging Support, we explain more how packaging happens.

Knowing the recipe dependencies chain, BitBake can sort all the recipes for the build in a feasible order. This enables BitBake to organize tasks in the following ways:

  • Recipes that do not have a dependency relation are built in parallel
  • Dependent recipes are built in a serial order, sorted in the way the dependencies are satisfied.
Every recipe included in the runtime dependencies is put in the build list. This sounds obvious, but even though they are not used during the build, they are included because they need to be ready for use so that the resulting binary packages are installable.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.32.116