From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id F125415800F for ; Sat, 14 Jan 2023 09:30:21 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D7888E0809; Sat, 14 Jan 2023 09:30:20 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6E046E0809 for ; Sat, 14 Jan 2023 09:30:20 +0000 (UTC) From: =?UTF-8?q?Ulrich=20M=C3=BCller?= To: gentoo-pms@lists.gentoo.org Cc: =?UTF-8?q?Ulrich=20M=C3=BCller?= Subject: [gentoo-pms] [PATCH 1/2] names.tex: Specify eclass names Date: Sat, 14 Jan 2023 10:30:07 +0100 Message-Id: <20230114093008.25265-1-ulm@gentoo.org> X-Mailer: git-send-email 2.39.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Package Manager Specification discussions X-BeenThere: gentoo-pms@gentoo.org X-BeenThere: gentoo-pms@lists.gentoo.org Reply-To: gentoo-pms@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: ab9e9773-8688-4d0b-ab70-727e2e5be13e X-Archives-Hash: d81fdf6f26f01c380df9c4fa325a21b4 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_. Signed-off-by: Ulrich Müller --- 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{.eclass}, where \t{} 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{.eclass}, where \t{} +is the name of this eclass, used by \t{inherit} and \t{EXPORT_FUNCTIONS} among other places. +\t{} 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