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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5CA421396D0 for ; Sun, 1 Oct 2017 07:11:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9C0DCE0BF9; Sun, 1 Oct 2017 07:11:54 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 63DFDE0BF9 for ; Sun, 1 Oct 2017 07:11:54 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EFB4F34175A for ; Sun, 1 Oct 2017 07:11:52 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 549798F66 for ; Sun, 1 Oct 2017 07:11:51 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1506841881.83161067ec7fd04a0a3d8dbd403732b72bf99238.mgorny@gentoo> Subject: [gentoo-commits] proj/pms:eapi-7 commit in: / X-VCS-Repository: proj/pms X-VCS-Files: dependencies.tex X-VCS-Directories: / X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 83161067ec7fd04a0a3d8dbd403732b72bf99238 X-VCS-Branch: eapi-7 Date: Sun, 1 Oct 2017 07:11:51 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 3f9847f9-d7e8-40d5-91e2-bdb6ed2155eb X-Archives-Hash: 8d70f04a3f172f82296d3d1134d52972 commit: 83161067ec7fd04a0a3d8dbd403732b72bf99238 Author: Michał Górny gentoo org> AuthorDate: Sat Sep 30 21:59:50 2017 +0000 Commit: Michał Górny gentoo org> CommitDate: Sun Oct 1 07:11:21 2017 +0000 URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=83161067 [WIP] EAPI 7 limits dependency group nesting. Restrict allowed dependency group nesting in EAPI 7. Most of the groups can only be used at top-level and inside USE-conditional groups (which can be reduced predictably). All-of groups are only permitted where they are really meaningful -- in any-of groups. Any more complex nesting is forbidden. This not only ensures that the dependency syntax variables stay more readable but also put lower requirements on the dependency parser and other mechanisms working with the variables. [TODO: add label & update eapi-differences] Bug: https://bugs.gentoo.org/632000 dependencies.tex | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/dependencies.tex b/dependencies.tex index fa818b7..fd142bb 100644 --- a/dependencies.tex +++ b/dependencies.tex @@ -88,31 +88,36 @@ be surrounded on both sides by whitespace, except at the start and end of the st followed by zero or more of (a dependency item of any kind followed by whitespace), followed by a close parenthesis. More formally: \t{all-of} \t{::=} \t{'(' whitespace (item whitespace)* ')'}. Permitted in all specification - style variables. + style variables. Permitted inside groups listed in table~\ref{tab:depend-nesting}. \item An any-of group, which consists of the string \t{||}, followed by whitespace, followed by an open parenthesis, followed by whitespace, followed by zero or more of (a dependency item of any kind followed by whitespace), followed by a close parenthesis. More formally: \t{any-of} \t{::=} \t{'||' whitespace '(' whitespace (item whitespace)* ')'}. Permitted in \t{DEPEND}, \t{RDEPEND}, \t{PDEPEND}, \t{LICENSE}, \t{REQUIRED_USE}. + Permitted inside groups listed in table~\ref{tab:depend-nesting}. \item An exactly-one-of group, which consists of the string \t{\textasciicircum\textasciicircum}, followed by whitespace, followed by an open parenthesis, followed by whitespace, followed by zero or more of (a dependency item of any kind followed by whitespace), followed by a close parenthesis. More formally: \t{exactly-one-of} \t{::=} \t{'\textasciicircum\textasciicircum' whitespace '(' whitespace (item whitespace)* ')'}. - Permitted in \t{REQUIRED_USE}. + Permitted in \t{REQUIRED_USE}. Permitted inside groups listed in table~\ref{tab:depend-nesting}. \item \featurelabel{at-most-one-of} An at-most-one-of group, which consists of the string \t{??}, followed by whitespace, followed by an open parenthesis, followed by whitespace, followed by zero or more of (a dependency item of any kind followed by whitespace), followed by a close parenthesis. More formally: \t{at-most-one-of} \t{::=} \t{'??'\ whitespace '(' whitespace (item whitespace)* ')'}. Permitted in \t{REQUIRED_USE} in EAPIs listed in - table~\ref{tab:at-most-one-of-table} as supporting \t{REQUIRED_USE ??}\ groups. + table~\ref{tab:at-most-one-of-table} as supporting \t{REQUIRED_USE ??}\ groups. Permitted inside + groups listed in table~\ref{tab:depend-nesting}. + + In EAPIs blah blah permitted only at top-level and inside USE-conditional group. \item A use-conditional group, which consists of an optional exclamation mark, followed by a use flag name, followed by a question mark, followed by whitespace, followed by an open parenthesis, followed by whitespace, followed by zero or more of (a dependency item of any kind followed by whitespace), followed by a close parenthesis. More formally: \t{use-conditional} \t{::=} \t{'!'?\ flag-name '?'\ whitespace '(' whitespace (item whitespace)* ')'}. - Permitted in all specification style variables. + Permitted in all specification style variables. Permitted inside groups listed + in table~\ref{tab:depend-nesting}. \end{compactitem} In particular, note that whitespace is not optional. @@ -159,6 +164,30 @@ In particular, note that whitespace is not optional. \end{tabular} \end{centertable} +\ChangeWhenAddingAnEAPI{7} +\begin{centertable}{EAPI-specific group nesting restrictions} + \label{tab:depend-nesting} + \begin{tabular}{lP{4em}P{4em}P{4em}P{4em}P{4em}} + \toprule + \multicolumn{1}{c}{\textbf{EAPI}} & + \multicolumn{1}{c}{\textbf{all-of}} & + \multicolumn{1}{c}{\textbf{any-of}} & + \multicolumn{1}{c}{\textbf{exactly-one-of}} & + \multicolumn{1}{c}{\textbf{at-most-one-of}} & + \multicolumn{1}{c}{\textbf{use-conditional}} \\ + & \multicolumn{5}{c}{\textbf{permitted inside}} \\ + \midrule + 0, 1, 2, 3, 4 & all groups & all groups & all groups & n/a & all groups \\ + 5, 6 & all groups & all groups & all groups & all groups & all groups \\ + 7 & any-of + & top, use-conditional + & top, use-conditional + & top, use-conditional + & top, use-conditional \\ + \bottomrule + \end{tabular} +\end{centertable} + \subsection{All-of dependency specifications} In an all-of group, all of the child elements must be matched.