commit: e06fbb1a1067eb1971cecd6c99feaa683d138fae
Author: Thomas D <whissi <AT> whissi <DOT> de>
AuthorDate: Wed Mar 25 21:25:03 2015 +0000
Commit: Markos Chandras <hwoarang <AT> gentoo <DOT> org>
CommitDate: Wed Mar 25 21:25:03 2015 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=e06fbb1a
pkg_pretend: Binary packages also call this function
Proof: Create a dummy ebuild with
pkg_pretend() {
echo "Calling pkg_pretend()..."
}
Now create the binary package:
# emerge --buildpkgonly app-misc/testpkg::my-overlay
These are the packages that would be built, in order:
Calculating dependencies... done!
[ebuild N *] app-misc/testpkg-0.0.1::my-overlay 0 KiB
Total: 1 package (1 new), Size of downloads: 0 KiB
>>> Verifying ebuild manifests
>>> Running pre-merge checks for app-misc/testpkg-0.0.1
Calling pkg_pretend()...
[...]
When you now install the binary package, pkg_pretend() will be called again:
# emerge --usepkg=y -a1 app-misc/testpkg::my-overlay
These are the packages that would be merged, in order:
Calculating dependencies... done!
[binary N *] app-misc/testpkg-0.0.1::my-overlay 0 KiB
Total: 1 package (1 new, 1 binary), Size of downloads: 0 KiB
Would you like to merge these packages? [Yes/No] y
>>> Running pre-merge checks for app-misc/testpkg-0.0.1
* testpkg-0.0.1.tbz2 MD5 SHA1 size ;-) ... [ ok ]
Calling pkg_pretend()...
[...]
ebuild-writing/functions/pkg_pretend/text.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ebuild-writing/functions/pkg_pretend/text.xml
b/ebuild-writing/functions/pkg_pretend/text.xml
index 0279145..61d213d 100644
--- a/ebuild-writing/functions/pkg_pretend/text.xml
+++ b/ebuild-writing/functions/pkg_pretend/text.xml
@@ -23,7 +23,7 @@
</tr>
<tr>
<th>Called for</th>
- <ti>ebuild</ti>
+ <ti>ebuild, binary</ti>
</tr>
<tr>
<th>EAPI</th>