diff options
author | 2019-11-08 11:08:40 -0500 | |
---|---|---|
committer | 2019-11-12 12:14:58 -0500 | |
commit | 93450a9dc3fb1fcc1ec90e3364b60673084c0199 (patch) | |
tree | 27014e8a4e15f90fb31b4347d869e951de582828 /ebuild-writing/functions | |
parent | ebuild-writing/functions/diagram.svg: add pkg_pretend to the figure (diff) | |
download | devmanual-93450a9dc3fb1fcc1ec90e3364b60673084c0199.tar.gz devmanual-93450a9dc3fb1fcc1ec90e3364b60673084c0199.tar.bz2 devmanual-93450a9dc3fb1fcc1ec90e3364b60673084c0199.zip |
ebuild-writing/functions: mention pkg_pretend as part of the phase sequence
Acked-by: Michael Orlitzky <mjo@gentoo.org>
Signed-off-by: Göktürk Yüksek <gokturk@gentoo.org>
Closes: https://github.com/gentoo/devmanual.gentoo.org/pull/117
Diffstat (limited to 'ebuild-writing/functions')
-rw-r--r-- | ebuild-writing/functions/text.xml | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/ebuild-writing/functions/text.xml b/ebuild-writing/functions/text.xml index 325a9b4..a6deb0a 100644 --- a/ebuild-writing/functions/text.xml +++ b/ebuild-writing/functions/text.xml @@ -5,12 +5,13 @@ <body> <p> -When installing packages from source, the function call order is <c>pkg_setup</c>, +When installing packages from source, the function call order is +<c>pkg_pretend</c> (for EAPI=4 and later), <c>pkg_setup</c>, <c>src_unpack</c>, <c>src_prepare</c>, <c>src_configure</c>, <c>src_compile</c>, <c>src_test</c> (optional, <c>FEATURES="test"</c>), <c>src_install</c>, <c>pkg_preinst</c>, <c>pkg_postinst</c>. When installing packages -from a binary, the function call order is <c>pkg_setup</c>, <c>pkg_preinst</c>, -<c>pkg_postinst</c>. +from a binary, the function call order is <c>pkg_pretend</c>, +<c>pkg_setup</c>, <c>pkg_preinst</c>, <c>pkg_postinst</c>. As some phases haven't been introduced from the beginning, you can have a look at <uri link="::ebuild-writing/eapi"/> for an overview, what have been introduced in which EAPI. </p> @@ -18,6 +19,16 @@ As some phases haven't been introduced from the beginning, you can have a look a <figure short="How the ebuild functions are processed" link="diagram.png"/> <p> +The <c>pkg_pretend</c> function is to be used for performing various +early sanity checks, such as ensuring that certain kernel options are +enabled. It is important to keep in mind that <c>pkg_pretend</c> runs +separately from the rest of the phase function sequence. Consequently, +there is no environment saving or propagation to the next +phase. Moreover, ebuild dependencies are not guaranteed to be +satisfied at this phase. +</p> + +<p> The <c>pkg_prerm</c> and <c>pkg_postrm</c> functions are called when uninstalling a package. The <c>pkg_config</c> function is used for any special package configuration <d/> it is only run when explicitly requested by the user. The |