summaryrefslogtreecommitdiffstats
path: root/documentation/ref-manual/technical-details.xml
diff options
context:
space:
mode:
authorScott Rifenbark <srifenbark@gmail.com>2016-09-13 11:15:02 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-23 15:27:34 +0100
commit8bc6c1c2c817fdc4ee12e165489aab6885fa9e9c (patch)
tree0a37ea47140367bd7c69ed8edab5823c6897fd0c /documentation/ref-manual/technical-details.xml
parent899ea9cb4839580c7f562e1601e58ac71a6dca4e (diff)
downloadpoky-8bc6c1c2c817fdc4ee12e165489aab6885fa9e9c.tar.gz
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 <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/ref-manual/technical-details.xml')
-rw-r--r--documentation/ref-manual/technical-details.xml107
1 files changed, 107 insertions, 0 deletions
diff --git a/documentation/ref-manual/technical-details.xml b/documentation/ref-manual/technical-details.xml
index 6bad547e50..e5c8eb83b6 100644
--- a/documentation/ref-manual/technical-details.xml
+++ b/documentation/ref-manual/technical-details.xml
@@ -979,6 +979,113 @@
979 </section> 979 </section>
980</section> 980</section>
981 981
982<section id='automatically-added-runtime-dependencies'>
983 <title>Automatically Added Runtime Dependencies</title>
984
985 <para>
986 The OpenEmbedded build system automatically adds common types of
987 runtime dependencies between packages, which means you do not need to
988 explicitly declare the packages using
989 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>.
990 Two automatic mechanisms exist (<filename>shlibdeps</filename> and
991 <filename>pcdeps</filename>) that handle shared libraries and
992 package configuration (pkg-config) modules, respectively.
993 For other types of runtime dependencies, you must manually declare
994 the dependencies.
995 <itemizedlist>
996 <listitem><para>
997 <filename>shlibdeps</filename>:
998 During the
999 <link linkend='ref-tasks-package'><filename>do_package</filename></link>
1000 task of each recipe, all shared libraries installed by the
1001 recipe are located.
1002 For each shared library, the package that contains the shared
1003 library is registered as providing the shared library.
1004 More specifically, the package is registered as providing the
1005 <ulink url='https://en.wikipedia.org/wiki/Soname'>soname</ulink>
1006 of the library.
1007 The resulting shared-library-to-package mapping
1008 is saved globally in
1009 <link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link>
1010 by the
1011 <link linkend='ref-tasks-packagedata'><filename>do_packagedata</filename></link>
1012 task.</para>
1013
1014 <para>Simultaneously, all executables and shared libraries
1015 installed by the recipe are inspected to see what shared
1016 libraries they link against.
1017 For each shared library dependency that is found,
1018 <filename>PKGDATA_DIR</filename> is queried to
1019 see if some package (likely from a different recipe) contains
1020 the shared library.
1021 If such a package is found, a runtime dependency is added from
1022 the package that depends on the shared library to the package
1023 that contains the library.</para>
1024
1025 <para>If the library being linked against is versioned
1026 (i.e. includes a version number), then the automatically added
1027 runtime dependency will specify at least that version, as if
1028 "<replaceable>package</replaceable> (>= <replaceable>version</replaceable>)"
1029 had been added to
1030 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>.
1031 This dependency forces an upgrade of the package that provides
1032 the shared library when installing the package that depends on
1033 the library, if needed.</para>
1034
1035 <para>If you want to avoid a package being registered as
1036 providing a particular shared library (e.g. because the library
1037 is for internal use only), then add the library to
1038 <link linkend='var-PRIVATE_LIBS'><filename>PRIVATE_LIBS</filename></link>
1039 inside the package's recipe.
1040 </para></listitem>
1041 <listitem><para>
1042 <filename>pcdeps</filename>:
1043 During the
1044 <link linkend='ref-tasks-package'><filename>do_package</filename></link>
1045 task of each recipe, all pkg-config modules
1046 (<filename>*.pc</filename> files) installed by the recipe are
1047 located.
1048 For each module, the package that contains the module is
1049 registered as providing the module.
1050 The resulting module-to-package mapping is saved globally in
1051 <link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link>
1052 by the
1053 <link linkend='ref-tasks-packagedata'><filename>do_packagedata</filename></link>
1054 task.</para>
1055
1056 <para>Simultaneously, all pkg-config modules installed by the
1057 recipe are inspected to see what other modules on which the
1058 pkg-config modules depend.
1059 A module is seen as depending on another module if it contains
1060 a "Requires:" line that specifies the other module.
1061 For each module dependency,
1062 <filename>PKGDATA_DIR</filename> is queried to see if some
1063 package contains the module.
1064 If such a package is found, a runtime dependency is added from
1065 the package that depends on the module to the package that
1066 contains the module.
1067 <note>
1068 The <filename>pcdeps</filename> mechanism most often infers
1069 dependencies between <filename>-dev</filename> packages.
1070 </note>
1071 </para></listitem>
1072 </itemizedlist>
1073 </para>
1074
1075 <para>
1076 The <filename>do_package</filename> task depends on the
1077 <link linkend='ref-tasks-packagedata'><filename>do_packagedata</filename></link>
1078 task of each recipe in
1079 <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>
1080 through use of a
1081 <ulink url='&YOCTO_DOCS_BB_URL;#variable-flags'><filename>[vardeps]</filename></ulink>
1082 declaration, which guarantees that the required
1083 shared-library/module-to-package mapping information will be available
1084 when needed as long as <filename>DEPENDS</filename> has been
1085 correctly set.
1086 </para>
1087</section>
1088
982<section id='fakeroot-and-pseudo'> 1089<section id='fakeroot-and-pseudo'>
983 <title>Fakeroot and Pseudo</title> 1090 <title>Fakeroot and Pseudo</title>
984 1091