From 8bc6c1c2c817fdc4ee12e165489aab6885fa9e9c Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Tue, 13 Sep 2016 11:15:02 -0700 Subject: ref-manual: New section and updates for runtime dep work fixes [YOCTO #10248] The bulk of this change is a new section called "Automatically Added Runtime Dependencies". Additionally, changes were made to the RDEPENDS and DEPENDS variables. Some cross-referencing to the new material was also added in the do_package task entry, the do_packagedata task entry, the PKGDATA_DIR glossary entry, and the PRIVATE_LIBS glossary entry. (From yocto-docs rev: 16504cd0eb23e102322c6c6096c5b52500a04640) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- documentation/ref-manual/ref-variables.xml | 146 +++++++++++++++-------------- 1 file changed, 76 insertions(+), 70 deletions(-) (limited to 'documentation/ref-manual/ref-variables.xml') diff --git a/documentation/ref-manual/ref-variables.xml b/documentation/ref-manual/ref-variables.xml index afc36a5b14..188cd74935 100644 --- a/documentation/ref-manual/ref-variables.xml +++ b/documentation/ref-manual/ref-variables.xml @@ -2833,9 +2833,9 @@ add any runtime dependencies between the packages produced by the two recipes. However, as explained in the - RDEPENDS - glossary entry, runtime dependencies will often - be added automatically, meaning + "Automatically Added Runtime Dependencies" + section, runtime dependencies will often be + added automatically, meaning DEPENDS alone is sufficient for most recipes. @@ -9651,14 +9651,16 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3" do_packagedata task packages data for each recipe and installs it into this temporary, shared area. - This directory defaults to the following: + This directory defaults to the following, which you should + not change: ${STAGING_DIR_HOST}/pkgdata - - - - Do not change this default. + For examples of how this data is used, see the + "Automatically Added Runtime Dependencies" + section and the + "Viewing Package Information with oe-pkgdata-util" + section. @@ -10133,6 +10135,12 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3" libplds4.so" + + + For more information, see the + "Automatically Added Runtime Dependencies" + section. + @@ -10427,40 +10435,60 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3" RDEPENDS - RDEPENDS[doc] = "Lists a package's runtime dependencies (i.e. other packages) that must be installed for the package to be built. They must be the names of other packages as listed in the PACKAGES variable, not recipe names (PN)." + RDEPENDS[doc] = "Lists runtime dependencies of a package." - Lists a package's runtime dependencies (i.e. other packages) - that must be installed in order for the built package to run - correctly. - If a package in this list cannot be found during the build, - you will get a build error. + Lists runtime dependencies of a package. + These dependencies are other packages that must be + installed in order for the package to function correctly. + As an example, the following assignment declares that the + package foo needs the packages + bar and baz to + be installed: + + RDEPENDS_foo = "bar baz" + + The most common types of package runtime dependencies are + automatically detected and added. + Therefore, most recipes do not need to set + RDEPENDS. + For more information, see the + "Automatically Added Runtime Dependencies" + section. + + + + The practical effect of the above + RDEPENDS assignment is that + bar and baz + will be declared as dependencies inside the package + foo when it is written out by one of + the + do_package_write_* + tasks. + Exactly how this is done depends on the package format used + as described in the + PACKAGE_CLASSES + variable. + When the corresponding package manager installs the + package, it will know to also install the packages on + which it depends. - When you use the RDEPENDS variable - in a recipe, you are essentially stating that the recipe's + To ensure that the packages bar and + baz get built, the previous + RDEPENDS assignment also causes a task + dependency to be added. + This dependency is from the recipe's do_build - task depends on the existence of a specific package. - Consider this simple example for two recipes named "a" and - "b" that produce similarly named IPK packages. - In this example, the RDEPENDS - statement appears in the "a" recipe: - - RDEPENDS_${PN} = "b" - - Here, the dependency is such that the - do_build task for recipe "a" depends - on the - do_package_write_ipk - task of recipe "b". - This means the package file for "b" must be available when - the output for recipe "a" has been completely built. - More importantly, package "a" will be marked as depending - on package "b" in a manner that is understood by the - package manager. + (not to be confused with the + do_compile) + task to the to the do_package_write_* + task of the recipes that build bar and + baz. @@ -10480,7 +10508,8 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3" Because the RDEPENDS variable applies to packages being built, you should always use the variable - in a form with an attached package name. + in a form with an attached package name (remember that a + single recipe can build multiple packages). For example, suppose you are building a development package that depends on the perl package. In this case, you would use the following @@ -10508,41 +10537,18 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3" - The package name you attach to the - RDEPENDS variable must appear - as it would in the PACKAGES - namespace before any renaming of the output package by - classes like - debian. - - - - In many cases you do not need to explicitly add - runtime dependencies using - RDEPENDS since some automatic - handling occurs: - - shlibdeps: - If a runtime package contains a compiled binary, - the build processes the binary in order to - determine any shared libraries - (.so files) to which it is - dynamically linked. - The build process adds the packages containing - these libraries to RDEPENDS - when creating the runtime package. - In addition, if the shared library is versioned, - the dependency will have the version appended to it - in order to force an upgrade to the appropriate - version if needed. - - pcdeps: If - the package ships a pkg-config - information file, the build process uses this file - to add items to the RDEPENDS - variable to create the runtime packages. - - + The package names you use with + RDEPENDS must appear as they would in + the PACKAGES variable. + The + PKG + variable allows a different name to be used for + the final package (e.g. the + debian + class uses this to rename packages), but this final package + name cannot be used with RDEPENDS, + which makes sense as RDEPENDS is meant + to be independent of the package format used. -- cgit v1.2.3-54-g00ecf