1 |
commit: 0ef26e79892567f73359629f0cc0c00df3651dd1 |
2 |
Author: Amit Dor-Shifer <amitds <AT> oversi <DOT> com> |
3 |
AuthorDate: Mon Oct 19 07:37:22 2009 +0000 |
4 |
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jun 5 21:01:41 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=0ef26e79 |
7 |
|
8 |
general-concepts/config-protect: Add example for env.d |
9 |
|
10 |
Closes: https://bugs.gentoo.org/289565 |
11 |
[Make the XML validate. Small tweaks to example and wording.] |
12 |
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> |
13 |
|
14 |
general-concepts/config-protect/text.xml | 15 +++++++++++++++ |
15 |
1 file changed, 15 insertions(+) |
16 |
|
17 |
diff --git a/general-concepts/config-protect/text.xml b/general-concepts/config-protect/text.xml |
18 |
index ec74a86..cca1457 100644 |
19 |
--- a/general-concepts/config-protect/text.xml |
20 |
+++ b/general-concepts/config-protect/text.xml |
21 |
@@ -25,6 +25,21 @@ |
22 |
similar. If you need a file renamed, removed or changed in a particular way, you |
23 |
should display a message informing the user. |
24 |
</p> |
25 |
+ |
26 |
+<p> |
27 |
+An ebuild can append to the <c>CONFIG_PROTECT_MASK</c> variable by using |
28 |
+Portage's <uri link="::tasks-reference/environment/"/> mechanism. The ebuild |
29 |
+has to generate an <c>env.d</c> file, then install it using <c>doenvd</c> or |
30 |
+<c>newenvd</c>. <c>emerge</c> shall call <c>env-update</c> and generate the |
31 |
+proper environment for proceeding with its merge. The following snippet (from |
32 |
+<c>src_install</c>) shall cause <c>/etc/test.cfg</c> to be auto-merged without |
33 |
+needing to call <c>etc-update</c> after the package is merged: |
34 |
+</p> |
35 |
+ |
36 |
+<codesample lang="ebuild"> |
37 |
+ newenvd - 99my-pkg <<< "CONFIG_PROTECT_MASK=\"/etc/test.cfg\"" |
38 |
+</codesample> |
39 |
+ |
40 |
</body> |
41 |
</chapter> |
42 |
</guide> |