Gentoo Archives: gentoo-pms

From: "Michał Górny" <mgorny@g.o>
To: gentoo-pms@l.g.o
Cc: "Ulrich Müller" <ulm@g.o>
Subject: [gentoo-pms] [PATCH] Ban empty groups in dependency specifications.
Date: Mon, 02 Oct 2017 16:52:49
Message-Id: 20171002165241.22827-1-mgorny@gentoo.org
1 From: Ulrich Müller <ulm@g.o>
2
3 The specification for empty groups was originally added to match
4 historical Portage behaviour. However, Portage was changed in 2011
5 to treat empty dependency groups as an error, therefore ebuilds cannot
6 rely on any definite behaviour. Consequently, empty groups are not used
7 by any ebuild or eclass in the Gentoo repository.
8
9 Note that the explicit handling for empty groups is still retained for
10 the case of implicit empty groups resulting from collapsing USE
11 conditionals in any-of groups et al.
12
13 This is a retroactive change for all EAPIs.
14
15 Bug: https://bugs.gentoo.org/370565
16 ---
17 dependencies.tex | 20 ++++++++++----------
18 1 file changed, 10 insertions(+), 10 deletions(-)
19
20 diff --git a/dependencies.tex b/dependencies.tex
21 index 1aea135..ed3ea01 100644
22 --- a/dependencies.tex
23 +++ b/dependencies.tex
24 @@ -60,33 +60,33 @@ be surrounded on both sides by whitespace, except at the start and end of the st
25 \item A use flag name, optionally preceded by an exclamation mark. Permitted in \t{REQUIRED_USE}.
26 \item A simple string. Permitted in \t{RESTRICT} and \t{PROPERTIES}.
27 \item An all-of group, which consists of an open parenthesis, followed by whitespace,
28 - followed by zero or more of (a dependency item of any kind followed by whitespace), followed
29 + followed by one or more of (a dependency item of any kind followed by whitespace), followed
30 by a close parenthesis. More formally:
31 - \t{all-of} \t{::=} \t{'(' whitespace (item whitespace)* ')'}. Permitted in all specification
32 + \t{all-of} \t{::=} \t{'(' whitespace (item whitespace)+ ')'}. Permitted in all specification
33 style variables.
34 \item An any-of group, which consists of the string \t{||}, followed by whitespace,
35 - followed by an open parenthesis, followed by whitespace, followed by zero or more
36 + followed by an open parenthesis, followed by whitespace, followed by one or more
37 of (a dependency item of any kind followed by whitespace), followed by a close parenthesis.
38 - More formally: \t{any-of} \t{::=} \t{'||' whitespace '(' whitespace (item whitespace)* ')'}.
39 + More formally: \t{any-of} \t{::=} \t{'||' whitespace '(' whitespace (item whitespace)+ ')'}.
40 Permitted in \t{DEPEND}, \t{RDEPEND}, \t{PDEPEND}, \t{LICENSE}, \t{REQUIRED_USE}.
41 \item An exactly-one-of group, which consists of the string \t{\textasciicircum\textasciicircum},
42 followed by whitespace, followed by an open parenthesis, followed by whitespace, followed by
43 - zero or more of (a dependency item of any kind followed by whitespace), followed by a close
44 + one or more of (a dependency item of any kind followed by whitespace), followed by a close
45 parenthesis. More formally: \t{exactly-one-of} \t{::=} \t{'\textasciicircum\textasciicircum'
46 - whitespace '(' whitespace (item whitespace)* ')'}.
47 + whitespace '(' whitespace (item whitespace)+ ')'}.
48 Permitted in \t{REQUIRED_USE}.
49 \item \featurelabel{at-most-one-of} An at-most-one-of group, which consists of the string \t{??},
50 followed by whitespace, followed by an open parenthesis, followed by whitespace, followed by
51 - zero or more of (a dependency item of any kind followed by whitespace), followed by a close
52 + one or more of (a dependency item of any kind followed by whitespace), followed by a close
53 parenthesis. More formally: \t{at-most-one-of} \t{::=} \t{'??'\ whitespace '(' whitespace
54 - (item whitespace)* ')'}. Permitted in \t{REQUIRED_USE} in EAPIs listed in
55 + (item whitespace)+ ')'}. Permitted in \t{REQUIRED_USE} in EAPIs listed in
56 table~\ref{tab:at-most-one-of-table} as supporting \t{REQUIRED_USE ??}\ groups.
57 \item A use-conditional group, which consists of an optional exclamation mark, followed by
58 a use flag name, followed by a question mark, followed by whitespace, followed by
59 - an open parenthesis, followed by whitespace, followed by zero or more of (a dependency item
60 + an open parenthesis, followed by whitespace, followed by one or more of (a dependency item
61 of any kind followed by whitespace), followed by a close parenthesis. More formally:
62 \t{use-conditional} \t{::=} \t{'!'?\ flag-name '?'\ whitespace '(' whitespace (item
63 - whitespace)* ')'}.
64 + whitespace)+ ')'}.
65 Permitted in all specification style variables.
66 \end{compactitem}
67
68 --
69 2.14.2