summaryrefslogtreecommitdiffstats
path: root/documentation/dev-manual/dev-manual-common-tasks.xml
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/dev-manual/dev-manual-common-tasks.xml')
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml24
1 files changed, 19 insertions, 5 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index bdf9cfc241..f9b2910578 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -3207,21 +3207,21 @@
3207 a package on the target or during image creation when a 3207 a package on the target or during image creation when a
3208 package is included in an image. 3208 package is included in an image.
3209 To add a post-installation script to a package, add a 3209 To add a post-installation script to a package, add a
3210 <filename>pkg_postinst_PACKAGENAME()</filename> function to 3210 <filename>pkg_postinst_</filename><replaceable>PACKAGENAME</replaceable><filename>()</filename> function to
3211 the recipe file (<filename>.bb</filename>) and replace 3211 the recipe file (<filename>.bb</filename>) and replace
3212 <filename>PACKAGENAME</filename> with the name of the package 3212 <replaceable>PACKAGENAME</replaceable> with the name of the package
3213 you want to attach to the <filename>postinst</filename> 3213 you want to attach to the <filename>postinst</filename>
3214 script. 3214 script.
3215 To apply the post-installation script to the main package 3215 To apply the post-installation script to the main package
3216 for the recipe, which is usually what is required, specify 3216 for the recipe, which is usually what is required, specify
3217 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink><filename>}</filename> 3217 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink><filename>}</filename>
3218 in place of <filename>PACKAGENAME</filename>. 3218 in place of <replaceable>PACKAGENAME</replaceable>.
3219 </para> 3219 </para>
3220 3220
3221 <para> 3221 <para>
3222 A post-installation function has the following structure: 3222 A post-installation function has the following structure:
3223 <literallayout class='monospaced'> 3223 <literallayout class='monospaced'>
3224 pkg_postinst_PACKAGENAME() { 3224 pkg_postinst_<replaceable>PACKAGENAME</replaceable>() {
3225 # Commands to carry out 3225 # Commands to carry out
3226 } 3226 }
3227 </literallayout> 3227 </literallayout>
@@ -3250,7 +3250,7 @@
3250 To delay script execution until boot time, use the following 3250 To delay script execution until boot time, use the following
3251 structure in the post-installation script: 3251 structure in the post-installation script:
3252 <literallayout class='monospaced'> 3252 <literallayout class='monospaced'>
3253 pkg_postinst_PACKAGENAME() { 3253 pkg_postinst_<replaceable>PACKAGENAME</replaceable>() {
3254 if [ x"$D" = "x" ]; then 3254 if [ x"$D" = "x" ]; then
3255 # Actions to carry out on the device go here 3255 # Actions to carry out on the device go here
3256 else 3256 else
@@ -3268,6 +3268,20 @@
3268 when executed on the first boot. 3268 when executed on the first boot.
3269 </para> 3269 </para>
3270 3270
3271 <para>
3272 If you have recipes that use <filename>pkg_postinst</filename>
3273 scripts and they require the use of non-standard native
3274 tools that have dependencies during rootfs construction, you
3275 need to use the
3276 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_WRITE_DEPS'><filename>PACKAGE_WRITE_DEPS</filename></ulink>
3277 variable in your recipe to list these tools.
3278 If you do not use this variable, the tools might be missing and
3279 execution of the post-installation script is deferred until
3280 first boot.
3281 Deferring the script to first boot is undesirable and for
3282 read-only rootfs impossible.
3283 </para>
3284
3271 <note> 3285 <note>
3272 Equivalent support for pre-install, pre-uninstall, and 3286 Equivalent support for pre-install, pre-uninstall, and
3273 post-uninstall scripts exist by way of 3287 post-uninstall scripts exist by way of