1 |
Author: halcy0n |
2 |
Date: 2009-04-19 21:04:16 +0000 (Sun, 19 Apr 2009) |
3 |
New Revision: 146 |
4 |
|
5 |
Modified: |
6 |
trunk/ebuild-writing/functions/pkg_preinst/text.xml |
7 |
trunk/ebuild-writing/users-and-groups/text.xml |
8 |
Log: |
9 |
Clarify user creation in pkg_preinst, thanks to Thilo Bangert <bangert AT gentoo DOT org> for the patch; bug #155620 |
10 |
|
11 |
|
12 |
Modified: trunk/ebuild-writing/functions/pkg_preinst/text.xml |
13 |
=================================================================== |
14 |
--- trunk/ebuild-writing/functions/pkg_preinst/text.xml 2009-04-08 14:34:55 UTC (rev 145) |
15 |
+++ trunk/ebuild-writing/functions/pkg_preinst/text.xml 2009-04-19 21:04:16 UTC (rev 146) |
16 |
@@ -61,7 +61,9 @@ |
17 |
|
18 |
<ul> |
19 |
<li> |
20 |
- Adding users and groups <d/> see <uri link="::ebuild-writing/users-and-groups"/>. |
21 |
+ Adding users and groups. However, since <c>pkg_preinst</c> may be called |
22 |
+ after <c>src_compile</c>, <c>pkg_setup</c> is the more suitable location for |
23 |
+ user creation <d/> see <uri link="::ebuild-writing/users-and-groups"/>. |
24 |
</li> |
25 |
<li> |
26 |
Modifying the install image for a particular system. This function |
27 |
|
28 |
Modified: trunk/ebuild-writing/users-and-groups/text.xml |
29 |
=================================================================== |
30 |
--- trunk/ebuild-writing/users-and-groups/text.xml 2009-04-08 14:34:55 UTC (rev 145) |
31 |
+++ trunk/ebuild-writing/users-and-groups/text.xml 2009-04-19 21:04:16 UTC (rev 146) |
32 |
@@ -8,9 +8,11 @@ |
33 |
If your ebuild requires a user or group to be added for a daemon, for example, |
34 |
this should be performed via the functions available in <c>eutils.eclass</c>. |
35 |
Regardless of whether you are adding a group or a user, this should be performed |
36 |
-in the <c>pkg_setup</c> function and <b>not</b> somewhere else: pkg_setup is sandbox-safe, |
37 |
+in the <c>pkg_setup</c> function: <c>pkg_setup</c> is sandbox-safe, |
38 |
is called before the compile process so a build that requires the user to exist will |
39 |
-have it, and is also called for both binary and source packages. |
40 |
+have it, and is also called for both binary and source packages. You may also |
41 |
+use the <c>pkg_preinst</c> or <c>pkg_setup</c> functions for user creation, if |
42 |
+the user is not required during <c>src_compile</c>. |
43 |
</p> |
44 |
</body> |