Gentoo Archives: gentoo-commits

From: Markos Chandras <hwoarang@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/devmanual:master commit in: ebuild-writing/functions/pkg_pretend/
Date: Mon, 30 Mar 2015 18:21:43
Message-Id: 1427318703.e06fbb1a1067eb1971cecd6c99feaa683d138fae.hwoarang@gentoo
1 commit: e06fbb1a1067eb1971cecd6c99feaa683d138fae
2 Author: Thomas D <whissi <AT> whissi <DOT> de>
3 AuthorDate: Wed Mar 25 21:25:03 2015 +0000
4 Commit: Markos Chandras <hwoarang <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 25 21:25:03 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=e06fbb1a
7
8 pkg_pretend: Binary packages also call this function
9
10 Proof: Create a dummy ebuild with
11
12 pkg_pretend() {
13 echo "Calling pkg_pretend()..."
14 }
15
16 Now create the binary package:
17
18 # emerge --buildpkgonly app-misc/testpkg::my-overlay
19
20 These are the packages that would be built, in order:
21
22 Calculating dependencies... done!
23 [ebuild N *] app-misc/testpkg-0.0.1::my-overlay 0 KiB
24
25 Total: 1 package (1 new), Size of downloads: 0 KiB
26
27 >>> Verifying ebuild manifests
28 >>> Running pre-merge checks for app-misc/testpkg-0.0.1
29 Calling pkg_pretend()...
30
31 [...]
32
33 When you now install the binary package, pkg_pretend() will be called again:
34
35 # emerge --usepkg=y -a1 app-misc/testpkg::my-overlay
36
37 These are the packages that would be merged, in order:
38
39 Calculating dependencies... done!
40 [binary N *] app-misc/testpkg-0.0.1::my-overlay 0 KiB
41
42 Total: 1 package (1 new, 1 binary), Size of downloads: 0 KiB
43
44 Would you like to merge these packages? [Yes/No] y
45 >>> Running pre-merge checks for app-misc/testpkg-0.0.1
46 * testpkg-0.0.1.tbz2 MD5 SHA1 size ;-) ... [ ok ]
47 Calling pkg_pretend()...
48
49 [...]
50
51 ebuild-writing/functions/pkg_pretend/text.xml | 2 +-
52 1 file changed, 1 insertion(+), 1 deletion(-)
53
54 diff --git a/ebuild-writing/functions/pkg_pretend/text.xml b/ebuild-writing/functions/pkg_pretend/text.xml
55 index 0279145..61d213d 100644
56 --- a/ebuild-writing/functions/pkg_pretend/text.xml
57 +++ b/ebuild-writing/functions/pkg_pretend/text.xml
58 @@ -23,7 +23,7 @@
59 </tr>
60 <tr>
61 <th>Called for</th>
62 - <ti>ebuild</ti>
63 + <ti>ebuild, binary</ti>
64 </tr>
65 <tr>
66 <th>EAPI</th>