blob: 92ad7f037ac01cc053d4ee1e00ac1fa4845c6982 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
<?xml version="1.0" encoding="UTF-8"?>
<devbook self="ebuild-writing/functions/pkg_postinst/">
<chapter>
<title>pkg_postinst</title>
<body>
<table>
<tr>
<th>Function</th>
<ti><c>pkg_postinst</c></ti>
</tr>
<tr>
<th>Purpose</th>
<ti>Called after image is installed to <c>${ROOT}</c></ti>
</tr>
<tr>
<th>Sandbox</th>
<ti>Disabled</ti>
</tr>
<tr>
<th>Privilege</th>
<ti>root</ti>
</tr>
<tr>
<th>Called for</th>
<ti>ebuild, binary</ti>
</tr>
</table>
</body>
<section>
<title>Default <c>pkg_postinst</c></title>
<body>
<codesample lang="ebuild">
pkg_postinst() {
return
}
</codesample>
</body>
</section>
<section>
<title>Sample <c>pkg_postinst</c></title>
<body>
<codesample lang="ebuild">
pkg_postinst() {
if ${OLD_FLUXBOX_VERSION} ; then
ewarn "You must restart fluxbox before using the [include] /directory/"
ewarn "feature if you are upgrading from an older fluxbox!"
ewarn " "
fi
elog "If you experience font problems, or if fluxbox takes a very"
elog "long time to start up, please try the 'disablexmb' USE flag."
elog "If that fails, please report bugs upstream."
}
</codesample>
</body>
</section>
<section>
<title>Common <c>pkg_postinst</c> tasks</title>
<body>
<p>
The most common use for <c>pkg_postinst</c> is to display post-install
informational messages or warnings. If you want to display selective
upgrade messages, you should do the call to <c>has_version</c> in an
earlier phase, like <c>pkg_preinst</c>, and store the result in a global
variable.</p>
</body>
</section>
</chapter>
</devbook>
|