From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-pms@lists.gentoo.org
Cc: "Ulrich Müller" <ulm@gentoo.org>
Subject: [gentoo-pms] [PATCH 1/2] names.tex: Specify eclass names
Date: Sat, 14 Jan 2023 10:30:07 +0100 [thread overview]
Message-ID: <20230114093008.25265-1-ulm@gentoo.org> (raw)
Eclasses may export phase functions prefixed with their name, so
ideally we would follow the syntax of Bash (and POSIX) identifiers:
| A word consisting solely of underscores, digits, and alphabetics
| from the portable character set. The first character of a name is
| not a digit.
Because many existing eclasses have a dot or a hyphen in their name,
we follow usage in the Gentoo repository instead. (The only historical
exception to the above was 64-bit.eclass, not used since 2006 and
removed in 2009.)
An eclass must not be named "default", otherwise names of exported
functions would collide with default_<phase-function>.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
---
eclasses.tex | 5 +++--
names.tex | 5 +++++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/eclasses.tex b/eclasses.tex
index e23dcd8..0b9b5d4 100644
--- a/eclasses.tex
+++ b/eclasses.tex
@@ -8,8 +8,9 @@ using them. The interpreter is therefore the same, and the same requirements for
hold.
Eclasses must be located in the \t{eclass} directory in the top level of the repository---see
-section~\ref{sec:eclass-dir}. Each eclass is a single file named \t{<name>.eclass}, where \t{<name>} is
-the name of this eclass, used by \t{inherit} and \t{EXPORT_FUNCTIONS} among other places.
+section~\ref{sec:eclass-dir}. Each eclass is a single file named \t{<name>.eclass}, where \t{<name>}
+is the name of this eclass, used by \t{inherit} and \t{EXPORT_FUNCTIONS} among other places.
+\t{<name>} must be a valid eclass name, as per section~\ref{sec:eclass-names}.
\section{The inherit Command}
\label{sec:inherit}
diff --git a/names.tex b/names.tex
index 2994719..76fa72d 100644
--- a/names.tex
+++ b/names.tex
@@ -18,6 +18,11 @@ syntax described in section~\ref{sec:version-spec}.
\note{A package name does not include the category. The term \i{qualified package name} is used
where a \t{category/package} pair is meant.}
+\subsection{Eclass names}
+\label{sec:eclass-names}
+An eclass name may contain any of the characters [\t{A-Za-z0-9_.-}]. It must begin with a letter or
+an underscore. In addition, an eclass cannot be named \t{default}.
+
\subsection{Slot names}
\label{sec:slot-names}
A slot name may contain any of the characters [\t{A-Za-z0-9+_.-}]. It must not begin with a
--
2.39.0
next reply other threads:[~2023-01-14 9:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-14 9:30 Ulrich Müller [this message]
2023-01-14 9:30 ` [gentoo-pms] [PATCH 2/2] Distinguish between "phase" and "phase function" Ulrich Müller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230114093008.25265-1-ulm@gentoo.org \
--to=ulm@gentoo.org \
--cc=gentoo-pms@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox