commit:     9cf9fc132e3d7f4431ab3db43555bd5c123d692d
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Oct  1 07:07:48 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Oct  1 07:11:40 2017 +0000
URL:        https://gitweb.gentoo.org/proj/pms.git/commit/?id=9cf9fc13

[WIP] EAPI 7 forbids empty dependency groups.

[TODO: add label & update eapi-differences]

Bug: https://bugs.gentoo.org/632000

 dependencies.tex | 31 +++++++++++++++++++++++++++++--
 1 file changed, 29 insertions(+), 2 deletions(-)

diff --git a/dependencies.tex b/dependencies.tex
index dca4a21..0cad80e 100644
--- a/dependencies.tex
+++ b/dependencies.tex
@@ -208,6 +208,8 @@ In particular, note that whitespace is not optional.
 
 In an all-of group, all of the child elements must be matched.
 
+The behavior for an empty group is defined in 
table~\ref{tab:depend-group-empty}.
+
 \subsection{USE-conditional dependency specifications}
 
 In a use-conditional group, if the associated use flag is enabled (or disabled 
if it has an
@@ -216,6 +218,8 @@ exclamation mark prefix), all of the child elements must be 
matched.
 It is an error for a flag to be used if it is not included in 
\t{IUSE_EFFECTIVE} as described in
 section~\ref{sec:use-iuse-handling}.
 
+The behavior for an empty group is defined in 
table~\ref{tab:depend-group-empty}.
+
 \subsection{Any-of dependency specifications}
 
 Any use-conditional group that is an immediate child of an any-of group, if 
not enabled (disabled
@@ -225,7 +229,7 @@ for match purposes.
 In an any-of group, at least one immediate child element must be matched. A 
blocker is
 considered to be matched if its associated package dependency specification is 
not matched.
 
-An empty any-of group counts as being matched.
+The behavior for an empty group is defined in 
table~\ref{tab:depend-group-empty}.
 
 \subsection{Exactly-one-of dependency specifications}
 
@@ -235,7 +239,7 @@ exactly-one-of group for match purposes.
 
 In an exactly-one-of group, exactly one immediate child element must be 
matched.
 
-An empty exactly-one-of group counts as being matched.
+The behavior for an empty group is defined in 
table~\ref{tab:depend-group-empty}.
 
 \subsection{At-most-one-of dependency specifications}
 
@@ -245,6 +249,29 @@ at-most-one-of group for match purposes.
 
 In an at-most-one-of group, at most one immediate child element must be 
matched.
 
+The behavior for an empty group is defined in 
table~\ref{tab:depend-group-empty}.
+
+\ChangeWhenAddingAnEAPI{7}
+\begin{centertable}{EAPI-specific empty group behavior}
+    \label{tab:depend-group-empty}
+    \begin{tabular}{llllll}
+      \toprule
+      \multicolumn{1}{c}{\textbf{EAPI}} &
+      \multicolumn{5}{c}{\textbf{Empty group counts as…}} \\
+         &
+      \multicolumn{1}{c}{\textbf{all-of}} &
+      \multicolumn{1}{c}{\textbf{use-conditional}} &
+      \multicolumn{1}{c}{\textbf{any-of}} &
+      \multicolumn{1}{c}{\textbf{exactly-one-of}} &
+      \multicolumn{1}{c}{\textbf{at-most-one-of}} \\
+      \midrule
+      0, 1, 2, 3, 4 & undefined & undefined & matched   & matched   & n/a      
 \\
+      5, 6          & undefined & undefined & matched   & matched   & matched  
 \\
+      7             & forbidden & forbidden & forbidden & forbidden & 
forbidden \\
+      \bottomrule
+    \end{tabular}
+\end{centertable}
+
 \subsection{Package dependency specifications}
 
 A package dependency can be in one of the following base formats. A package 
manager must warn or

Reply via email to