commit:     7ef569e7b5487784b5cab81daef60cd920da2082
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 17 07:08:26 2022 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Thu Aug 18 16:02:10 2022 +0000
URL:        https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=7ef569e7

ebuild-writing/variables: Add section about reserved variables

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 ebuild-writing/variables/text.xml | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/ebuild-writing/variables/text.xml 
b/ebuild-writing/variables/text.xml
index 4c7df4f..d77f4b7 100644
--- a/ebuild-writing/variables/text.xml
+++ b/ebuild-writing/variables/text.xml
@@ -721,6 +721,41 @@ table.
 </subsection>
 </section>
 
+<section>
+<title>Variables reserved for the package manager</title>
+<body>
+
+<p>
+Variables and functions that begin with any of the following strings (ignoring
+case) are reserved for package manager use. Ebuilds must neither use them nor
+rely upon them:
+</p>
+
+<ul>
+  <li><c>__</c> (two underscores)</li>
+  <li><c>abort</c></li>
+  <li><c>dyn</c></li>
+  <li><c>prep</c></li>
+</ul>
+
+<p>
+The same applies to functions and variables that contain any of the following
+strings (ignoring case):
+</p>
+
+<ul>
+  <li>
+    <c>ebuild</c> (unless immediately preceded by another letter, and except
+    for the <c>EBUILD_PHASE</c> and <c>EBUILD_PHASE_FUNC</c> variables)
+  </li>
+  <li><c>hook</c></li>
+  <li><c>paludis</c></li>
+  <li><c>portage</c></li>
+</ul>
+
+</body>
+</section>
+
 <section>
 <title>Version and Name Formatting Issues</title>
 <body>

Reply via email to