From ae06e04cd225d2c2147ca355e2dd39b4f6cf6775 Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Mon, 29 Jan 2018 15:18:03 -0800 Subject: documentation: Created new "Getting Started" manual. Creation involved removing the overview-manual and replacing it with the getting-started manual. All links to the string "&YOCTO_DOCS_OVERVIEW_URL" had to be replaced with "&YOCTO_DOCS_GS_URL" across the entire YP manual set. I renamed files used to create the manual with prefixes suited for the new manual name, which is "Getting Started With Yocto Project". The style sheet for the new manual needed updating to display the new .PNG image for the title page. The mega-manual file had to be updated to include the files. The mega-manual.sed file had to be updated to include the new manual and not use the overview manual. (From yocto-docs rev: 6c7abf9192390121000f577d6c98f259d290d15d) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- .../automatically-added-runtime-dependencies.html | 164 +++++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 documentation/getting-started/eclipse/html/getting-started/automatically-added-runtime-dependencies.html (limited to 'documentation/getting-started/eclipse/html/getting-started/automatically-added-runtime-dependencies.html') diff --git a/documentation/getting-started/eclipse/html/getting-started/automatically-added-runtime-dependencies.html b/documentation/getting-started/eclipse/html/getting-started/automatically-added-runtime-dependencies.html new file mode 100644 index 0000000000..885ee089e1 --- /dev/null +++ b/documentation/getting-started/eclipse/html/getting-started/automatically-added-runtime-dependencies.html @@ -0,0 +1,164 @@ + + + +3.4. Automatically Added Runtime Dependencies + + + + + + + +
+

+3.4. Automatically Added Runtime Dependencies

+

+ The OpenEmbedded build system automatically adds common types of + runtime dependencies between packages, which means that you do not + need to explicitly declare the packages using + RDEPENDS. + Three automatic mechanisms exist (shlibdeps, + pcdeps, and depchains) + that handle shared libraries, package configuration (pkg-config) + modules, and -dev and + -dbg packages, respectively. + For other types of runtime dependencies, you must manually declare + the dependencies. +

+
    +
  • +

    + shlibdeps: + During the + do_package + task of each recipe, all shared libraries installed by the + recipe are located. + For each shared library, the package that contains the + shared library is registered as providing the shared + library. + More specifically, the package is registered as providing + the + soname + of the library. + The resulting shared-library-to-package mapping + is saved globally in + PKGDATA_DIR + by the + do_packagedata + task.

    +

    Simultaneously, all executables and shared libraries + installed by the recipe are inspected to see what shared + libraries they link against. + For each shared library dependency that is found, + PKGDATA_DIR is queried to + see if some package (likely from a different recipe) + contains the shared library. + If such a package is found, a runtime dependency is added + from the package that depends on the shared library to the + package that contains the library.

    +

    The automatically added runtime dependency also + includes a version restriction. + This version restriction specifies that at least the + current version of the package that provides the shared + library must be used, as if + "package (>= version)" + had been added to + RDEPENDS. + This forces an upgrade of the package containing the shared + library when installing the package that depends on the + library, if needed.

    +

    If you want to avoid a package being registered as + providing a particular shared library (e.g. because the library + is for internal use only), then add the library to + PRIVATE_LIBS + inside the package's recipe. +

    +
  • +
  • +

    + pcdeps: + During the + do_package + task of each recipe, all pkg-config modules + (*.pc files) installed by the recipe + are located. + For each module, the package that contains the module is + registered as providing the module. + The resulting module-to-package mapping is saved globally in + PKGDATA_DIR + by the + do_packagedata + task.

    +

    Simultaneously, all pkg-config modules installed by + the recipe are inspected to see what other pkg-config + modules they depend on. + A module is seen as depending on another module if it + contains a "Requires:" line that specifies the other module. + For each module dependency, + PKGDATA_DIR is queried to see if some + package contains the module. + If such a package is found, a runtime dependency is added + from the package that depends on the module to the package + that contains the module. +

    +
    +

    Note

    + The pcdeps mechanism most often + infers dependencies between -dev + packages. +
    +

    +

    +
  • +
  • +

    + depchains: + If a package foo depends on a package + bar, then foo-dev + and foo-dbg are also made to depend on + bar-dev and + bar-dbg, respectively. + Taking the -dev packages as an + example, the bar-dev package might + provide headers and shared library symlinks needed by + foo-dev, which shows the need + for a dependency between the packages.

    +

    The dependencies added by + depchains are in the form of + RRECOMMENDS. +

    +
    +

    Note

    + By default, foo-dev also has an + RDEPENDS-style dependency on + foo, because the default value of + RDEPENDS_${PN}-dev (set in + bitbake.conf) includes + "${PN}". +
    +

    To ensure that the dependency chain is never broken, + -dev and -dbg + packages are always generated by default, even if the + packages turn out to be empty. + See the + ALLOW_EMPTY + variable for more information. +

    +
  • +
+

+

+

+ The do_package task depends on the + do_packagedata + task of each recipe in + DEPENDS + through use of a + [deptask] + declaration, which guarantees that the required + shared-library/module-to-package mapping information will be available + when needed as long as DEPENDS has been + correctly set. +

+
+ -- cgit v1.2.3-54-g00ecf