Gentoo Archives: gentoo-pms

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-pms@l.g.o
Subject: [gentoo-pms] [PATCH] Ban empty groups in dependency specifications.
Date: Wed, 23 Aug 2017 18:01:41
Message-Id: 22941.49918.450542.907616@a1i15.kph.uni-mainz.de
1 The specification for empty groups was originally added to match
2 historical Portage behaviour, but deviates from the usual convention
3 that empty OR operations should evaluate to false.
4
5 However, Portage was changed in 2011 to treat empty dependency groups
6 as an error, therefore ebuilds cannot rely on any definite behaviour.
7 Consequently, empty groups are not used by any ebuild or eclass in the
8 Gentoo repository.
9
10 This is an retroactive change for all EAPIs.
11
12 Bug: 370565
13 ---
14 dependencies.tex | 26 ++++++++++----------------
15 1 file changed, 10 insertions(+), 16 deletions(-)
16
17 diff --git a/dependencies.tex b/dependencies.tex
18 index d9a6f1a..62cd669 100644
19 --- a/dependencies.tex
20 +++ b/dependencies.tex
21 @@ -57,33 +57,33 @@ be surrounded on both sides by whitespace, except at the start and end of the st
22 \item A use flag name, optionally preceded by an exclamation mark. Permitted in \t{REQUIRED_USE}.
23 \item A simple string. Permitted in \t{RESTRICT} and \t{PROPERTIES}.
24 \item An all-of group, which consists of an open parenthesis, followed by whitespace,
25 - followed by zero or more of (a dependency item of any kind followed by whitespace), followed
26 + followed by one or more of (a dependency item of any kind followed by whitespace), followed
27 by a close parenthesis. More formally:
28 - \t{all-of} \t{::=} \t{'(' whitespace (item whitespace)* ')'}. Permitted in all specification
29 + \t{all-of} \t{::=} \t{'(' whitespace (item whitespace)+ ')'}. Permitted in all specification
30 style variables.
31 \item An any-of group, which consists of the string \t{||}, followed by whitespace,
32 - followed by an open parenthesis, followed by whitespace, followed by zero or more
33 + followed by an open parenthesis, followed by whitespace, followed by one or more
34 of (a dependency item of any kind followed by whitespace), followed by a close parenthesis.
35 - More formally: \t{any-of} \t{::=} \t{'||' whitespace '(' whitespace (item whitespace)* ')'}.
36 + More formally: \t{any-of} \t{::=} \t{'||' whitespace '(' whitespace (item whitespace)+ ')'}.
37 Permitted in \t{DEPEND}, \t{RDEPEND}, \t{PDEPEND}, \t{LICENSE}, \t{REQUIRED_USE}.
38 \item An exactly-one-of group, which consists of the string \t{\textasciicircum\textasciicircum},
39 followed by whitespace, followed by an open parenthesis, followed by whitespace, followed by
40 - zero or more of (a dependency item of any kind followed by whitespace), followed by a close
41 + one or more of (a dependency item of any kind followed by whitespace), followed by a close
42 parenthesis. More formally: \t{exactly-one-of} \t{::=} \t{'\textasciicircum\textasciicircum'
43 - whitespace '(' whitespace (item whitespace)* ')'}.
44 + whitespace '(' whitespace (item whitespace)+ ')'}.
45 Permitted in \t{REQUIRED_USE}.
46 \item \featurelabel{at-most-one-of} An at-most-one-of group, which consists of the string \t{??},
47 followed by whitespace, followed by an open parenthesis, followed by whitespace, followed by
48 - zero or more of (a dependency item of any kind followed by whitespace), followed by a close
49 + one or more of (a dependency item of any kind followed by whitespace), followed by a close
50 parenthesis. More formally: \t{at-most-one-of} \t{::=} \t{'??'\ whitespace '(' whitespace
51 - (item whitespace)* ')'}. Permitted in \t{REQUIRED_USE} in EAPIs listed in
52 + (item whitespace)+ ')'}. Permitted in \t{REQUIRED_USE} in EAPIs listed in
53 table~\ref{tab:at-most-one-of-table} as supporting \t{REQUIRED_USE ??}\ groups.
54 \item A use-conditional group, which consists of an optional exclamation mark, followed by
55 a use flag name, followed by a question mark, followed by whitespace, followed by
56 - an open parenthesis, followed by whitespace, followed by zero or more of (a dependency item
57 + an open parenthesis, followed by whitespace, followed by one or more of (a dependency item
58 of any kind followed by whitespace), followed by a close parenthesis. More formally:
59 \t{use-conditional} \t{::=} \t{'!'?\ flag-name '?'\ whitespace '(' whitespace (item
60 - whitespace)* ')'}.
61 + whitespace)+ ')'}.
62 Permitted in all specification style variables.
63 \end{compactitem}
64
65 @@ -138,8 +138,6 @@ for match purposes.
66 In an any-of group, at least one immediate child element must be matched. A blocker is
67 considered to be matched if its associated package dependency specification is not matched.
68
69 -An empty any-of group counts as being matched.
70 -
71 \subsection{Exactly-one-of dependency specifications}
72
73 Any use-conditional group that is an immediate child of an exactly-one-of group, if not enabled
74 @@ -148,8 +146,6 @@ exactly-one-of group for match purposes.
75
76 In an exactly-one-of group, exactly one immediate child element must be matched.
77
78 -An empty exactly-one-of group counts as being matched.
79 -
80 \subsection{At-most-one-of dependency specifications}
81
82 Any use-conditional group that is an immediate child of an at-most-one-of group, if not enabled
83 @@ -158,8 +154,6 @@ at-most-one-of group for match purposes.
84
85 In an at-most-one-of group, at most one immediate child element must be matched.
86
87 -An empty at-most-one-of group counts as being matched.
88 -
89 \subsection{Package dependency specifications}
90
91 A package dependency can be in one of the following base formats. A package manager must warn or
92 --
93 2.14.1

Replies