diff options
author | Scott Rifenbark <srifenbark@gmail.com> | 2018-01-11 11:02:11 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-02-14 15:25:28 +0000 |
commit | a60d9e29171eaf73dc5ce70fdd2ce92ec07876ec (patch) | |
tree | a0e6b77735696cf59cc23614fe885992b10d252a /documentation/ref-manual/technical-details.xml | |
parent | 00f87f84165964f262f8bb97378cfbef4b0c325a (diff) | |
download | poky-a60d9e29171eaf73dc5ce70fdd2ce92ec07876ec.tar.gz |
overview-manual, ref-manual: Moved auto added runtime deps section
Fixes [YOCTO #12370]
The "Automatically Added Runtime Dependencies" section moved from the
ref-manual to the overview-manual. This topic is concepts and needs
to live in the new overview-manual's concepts chapter. Fixed some
links in the ref-manual and one in the dev-manual.
(From yocto-docs rev: fa3e12030ce867cb81feed453d35c3a3643decd2)
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.xml | 144 |
1 files changed, 0 insertions, 144 deletions
diff --git a/documentation/ref-manual/technical-details.xml b/documentation/ref-manual/technical-details.xml index 06a018b8a9..b30dfe8597 100644 --- a/documentation/ref-manual/technical-details.xml +++ b/documentation/ref-manual/technical-details.xml | |||
@@ -13,150 +13,6 @@ | |||
13 | x32, Wayland support, and Licenses. | 13 | x32, Wayland support, and Licenses. |
14 | </para> | 14 | </para> |
15 | 15 | ||
16 | <section id='automatically-added-runtime-dependencies'> | ||
17 | <title>Automatically Added Runtime Dependencies</title> | ||
18 | |||
19 | <para> | ||
20 | The OpenEmbedded build system automatically adds common types of | ||
21 | runtime dependencies between packages, which means that you do not | ||
22 | need to explicitly declare the packages using | ||
23 | <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>. | ||
24 | Three automatic mechanisms exist (<filename>shlibdeps</filename>, | ||
25 | <filename>pcdeps</filename>, and <filename>depchains</filename>) that | ||
26 | handle shared libraries, package configuration (pkg-config) modules, | ||
27 | and <filename>-dev</filename> and <filename>-dbg</filename> packages, | ||
28 | respectively. | ||
29 | For other types of runtime dependencies, you must manually declare | ||
30 | the dependencies. | ||
31 | <itemizedlist> | ||
32 | <listitem><para> | ||
33 | <filename>shlibdeps</filename>: | ||
34 | During the | ||
35 | <link linkend='ref-tasks-package'><filename>do_package</filename></link> | ||
36 | task of each recipe, all shared libraries installed by the | ||
37 | recipe are located. | ||
38 | For each shared library, the package that contains the shared | ||
39 | library is registered as providing the shared library. | ||
40 | More specifically, the package is registered as providing the | ||
41 | <ulink url='https://en.wikipedia.org/wiki/Soname'>soname</ulink> | ||
42 | of the library. | ||
43 | The resulting shared-library-to-package mapping | ||
44 | is saved globally in | ||
45 | <link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link> | ||
46 | by the | ||
47 | <link linkend='ref-tasks-packagedata'><filename>do_packagedata</filename></link> | ||
48 | task.</para> | ||
49 | |||
50 | <para>Simultaneously, all executables and shared libraries | ||
51 | installed by the recipe are inspected to see what shared | ||
52 | libraries they link against. | ||
53 | For each shared library dependency that is found, | ||
54 | <filename>PKGDATA_DIR</filename> is queried to | ||
55 | see if some package (likely from a different recipe) contains | ||
56 | the shared library. | ||
57 | If such a package is found, a runtime dependency is added from | ||
58 | the package that depends on the shared library to the package | ||
59 | that contains the library.</para> | ||
60 | |||
61 | <para>The automatically added runtime dependency also includes | ||
62 | a version restriction. | ||
63 | This version restriction specifies that at least the current | ||
64 | version of the package that provides the shared library must be | ||
65 | used, as if | ||
66 | "<replaceable>package</replaceable> (>= <replaceable>version</replaceable>)" | ||
67 | had been added to | ||
68 | <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>. | ||
69 | This forces an upgrade of the package containing the shared | ||
70 | library when installing the package that depends on the | ||
71 | library, if needed.</para> | ||
72 | |||
73 | <para>If you want to avoid a package being registered as | ||
74 | providing a particular shared library (e.g. because the library | ||
75 | is for internal use only), then add the library to | ||
76 | <link linkend='var-PRIVATE_LIBS'><filename>PRIVATE_LIBS</filename></link> | ||
77 | inside the package's recipe. | ||
78 | </para></listitem> | ||
79 | <listitem><para> | ||
80 | <filename>pcdeps</filename>: | ||
81 | During the | ||
82 | <link linkend='ref-tasks-package'><filename>do_package</filename></link> | ||
83 | task of each recipe, all pkg-config modules | ||
84 | (<filename>*.pc</filename> files) installed by the recipe are | ||
85 | located. | ||
86 | For each module, the package that contains the module is | ||
87 | registered as providing the module. | ||
88 | The resulting module-to-package mapping is saved globally in | ||
89 | <link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link> | ||
90 | by the | ||
91 | <link linkend='ref-tasks-packagedata'><filename>do_packagedata</filename></link> | ||
92 | task.</para> | ||
93 | |||
94 | <para>Simultaneously, all pkg-config modules installed by the | ||
95 | recipe are inspected to see what other pkg-config modules they | ||
96 | depend on. | ||
97 | A module is seen as depending on another module if it contains | ||
98 | a "Requires:" line that specifies the other module. | ||
99 | For each module dependency, | ||
100 | <filename>PKGDATA_DIR</filename> is queried to see if some | ||
101 | package contains the module. | ||
102 | If such a package is found, a runtime dependency is added from | ||
103 | the package that depends on the module to the package that | ||
104 | contains the module. | ||
105 | <note> | ||
106 | The <filename>pcdeps</filename> mechanism most often infers | ||
107 | dependencies between <filename>-dev</filename> packages. | ||
108 | </note> | ||
109 | </para></listitem> | ||
110 | <listitem><para> | ||
111 | <filename>depchains</filename>: | ||
112 | If a package <filename>foo</filename> depends on a package | ||
113 | <filename>bar</filename>, then <filename>foo-dev</filename> | ||
114 | and <filename>foo-dbg</filename> are also made to depend on | ||
115 | <filename>bar-dev</filename> and <filename>bar-dbg</filename>, | ||
116 | respectively. | ||
117 | Taking the <filename>-dev</filename> packages as an example, | ||
118 | the <filename>bar-dev</filename> package might provide | ||
119 | headers and shared library symlinks needed by | ||
120 | <filename>foo-dev</filename>, which shows the need | ||
121 | for a dependency between the packages.</para> | ||
122 | |||
123 | <para>The dependencies added by <filename>depchains</filename> | ||
124 | are in the form of | ||
125 | <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>. | ||
126 | <note> | ||
127 | By default, <filename>foo-dev</filename> also has an | ||
128 | <filename>RDEPENDS</filename>-style dependency on | ||
129 | <filename>foo</filename>, because the default value of | ||
130 | <filename>RDEPENDS_${PN}-dev</filename> (set in | ||
131 | <filename>bitbake.conf</filename>) includes | ||
132 | "${PN}". | ||
133 | </note></para> | ||
134 | |||
135 | <para>To ensure that the dependency chain is never broken, | ||
136 | <filename>-dev</filename> and <filename>-dbg</filename> | ||
137 | packages are always generated by default, even if the packages | ||
138 | turn out to be empty. | ||
139 | See the | ||
140 | <link linkend='var-ALLOW_EMPTY'><filename>ALLOW_EMPTY</filename></link> | ||
141 | variable for more information. | ||
142 | </para></listitem> | ||
143 | </itemizedlist> | ||
144 | </para> | ||
145 | |||
146 | <para> | ||
147 | The <filename>do_package</filename> task depends on the | ||
148 | <link linkend='ref-tasks-packagedata'><filename>do_packagedata</filename></link> | ||
149 | task of each recipe in | ||
150 | <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link> | ||
151 | through use of a | ||
152 | <filename>[</filename><ulink url='&YOCTO_DOCS_BB_URL;#variable-flags'><filename>deptask</filename></ulink><filename>]</filename> | ||
153 | declaration, which guarantees that the required | ||
154 | shared-library/module-to-package mapping information will be available | ||
155 | when needed as long as <filename>DEPENDS</filename> has been | ||
156 | correctly set. | ||
157 | </para> | ||
158 | </section> | ||
159 | |||
160 | <section id='fakeroot-and-pseudo'> | 16 | <section id='fakeroot-and-pseudo'> |
161 | <title>Fakeroot and Pseudo</title> | 17 | <title>Fakeroot and Pseudo</title> |
162 | 18 | ||