* [gentoo-pms] [PATCH] Ban empty groups in dependency specifications.
@ 2017-08-23 17:48 Ulrich Müller
2017-10-02 16:45 ` Michał Górny
0 siblings, 1 reply; 3+ messages in thread
From: Ulrich Müller @ 2017-08-23 17:48 UTC (permalink / raw
To: gentoo-pms
[-- Attachment #1: Type: text/plain, Size: 5345 bytes --]
The specification for empty groups was originally added to match
historical Portage behaviour, but deviates from the usual convention
that empty OR operations should evaluate to false.
However, Portage was changed in 2011 to treat empty dependency groups
as an error, therefore ebuilds cannot rely on any definite behaviour.
Consequently, empty groups are not used by any ebuild or eclass in the
Gentoo repository.
This is an retroactive change for all EAPIs.
Bug: 370565
---
dependencies.tex | 26 ++++++++++----------------
1 file changed, 10 insertions(+), 16 deletions(-)
diff --git a/dependencies.tex b/dependencies.tex
index d9a6f1a..62cd669 100644
--- a/dependencies.tex
+++ b/dependencies.tex
@@ -57,33 +57,33 @@ be surrounded on both sides by whitespace, except at the start and end of the st
\item A use flag name, optionally preceded by an exclamation mark. Permitted in \t{REQUIRED_USE}.
\item A simple string. Permitted in \t{RESTRICT} and \t{PROPERTIES}.
\item An all-of group, which consists of an open parenthesis, followed by whitespace,
- followed by zero or more of (a dependency item of any kind followed by whitespace), followed
+ followed by one 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
+ \t{all-of} \t{::=} \t{'(' whitespace (item whitespace)+ ')'}. Permitted in all specification
style variables.
\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
+ followed by an open parenthesis, followed by whitespace, followed by one 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)* ')'}.
+ More formally: \t{any-of} \t{::=} \t{'||' whitespace '(' whitespace (item whitespace)+ ')'}.
Permitted in \t{DEPEND}, \t{RDEPEND}, \t{PDEPEND}, \t{LICENSE}, \t{REQUIRED_USE}.
\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
+ one 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)* ')'}.
+ whitespace '(' whitespace (item whitespace)+ ')'}.
Permitted in \t{REQUIRED_USE}.
\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
+ one 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
+ (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.
\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
+ an open parenthesis, followed by whitespace, followed by one 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)* ')'}.
+ whitespace)+ ')'}.
Permitted in all specification style variables.
\end{compactitem}
@@ -138,8 +138,6 @@ 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.
-
\subsection{Exactly-one-of dependency specifications}
Any use-conditional group that is an immediate child of an exactly-one-of group, if not enabled
@@ -148,8 +146,6 @@ 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.
-
\subsection{At-most-one-of dependency specifications}
Any use-conditional group that is an immediate child of an at-most-one-of group, if not enabled
@@ -158,8 +154,6 @@ at-most-one-of group for match purposes.
In an at-most-one-of group, at most one immediate child element must be matched.
-An empty at-most-one-of group counts as being matched.
-
\subsection{Package dependency specifications}
A package dependency can be in one of the following base formats. A package manager must warn or
--
2.14.1
[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [gentoo-pms] [PATCH] Ban empty groups in dependency specifications.
2017-08-23 17:48 Ulrich Müller
@ 2017-10-02 16:45 ` Michał Górny
0 siblings, 0 replies; 3+ messages in thread
From: Michał Górny @ 2017-10-02 16:45 UTC (permalink / raw
To: gentoo-pms
W dniu śro, 23.08.2017 o godzinie 19∶48 +0200, użytkownik Ulrich Müller
napisał:
> The specification for empty groups was originally added to match
> historical Portage behaviour, but deviates from the usual convention
> that empty OR operations should evaluate to false.
>
> However, Portage was changed in 2011 to treat empty dependency groups
> as an error, therefore ebuilds cannot rely on any definite behaviour.
> Consequently, empty groups are not used by any ebuild or eclass in the
> Gentoo repository.
>
> This is an retroactive change for all EAPIs.
>
> Bug: 370565
>
We've established (some time ago) that this doesn't correctly account
for empty groups resulting from eliminating USE conditionals from any-of
dependencies. I will send an updated version of Ulrich's patch in a few
minutes.
--
Best regards,
Michał Górny
^ permalink raw reply [flat|nested] 3+ messages in thread
* [gentoo-pms] [PATCH] Ban empty groups in dependency specifications.
@ 2017-10-02 16:52 Michał Górny
0 siblings, 0 replies; 3+ messages in thread
From: Michał Górny @ 2017-10-02 16:52 UTC (permalink / raw
To: gentoo-pms; +Cc: Ulrich Müller
From: Ulrich Müller <ulm@gentoo.org>
The specification for empty groups was originally added to match
historical Portage behaviour. However, Portage was changed in 2011
to treat empty dependency groups as an error, therefore ebuilds cannot
rely on any definite behaviour. Consequently, empty groups are not used
by any ebuild or eclass in the Gentoo repository.
Note that the explicit handling for empty groups is still retained for
the case of implicit empty groups resulting from collapsing USE
conditionals in any-of groups et al.
This is a retroactive change for all EAPIs.
Bug: https://bugs.gentoo.org/370565
---
dependencies.tex | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/dependencies.tex b/dependencies.tex
index 1aea135..ed3ea01 100644
--- a/dependencies.tex
+++ b/dependencies.tex
@@ -60,33 +60,33 @@ be surrounded on both sides by whitespace, except at the start and end of the st
\item A use flag name, optionally preceded by an exclamation mark. Permitted in \t{REQUIRED_USE}.
\item A simple string. Permitted in \t{RESTRICT} and \t{PROPERTIES}.
\item An all-of group, which consists of an open parenthesis, followed by whitespace,
- followed by zero or more of (a dependency item of any kind followed by whitespace), followed
+ followed by one 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
+ \t{all-of} \t{::=} \t{'(' whitespace (item whitespace)+ ')'}. Permitted in all specification
style variables.
\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
+ followed by an open parenthesis, followed by whitespace, followed by one 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)* ')'}.
+ More formally: \t{any-of} \t{::=} \t{'||' whitespace '(' whitespace (item whitespace)+ ')'}.
Permitted in \t{DEPEND}, \t{RDEPEND}, \t{PDEPEND}, \t{LICENSE}, \t{REQUIRED_USE}.
\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
+ one 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)* ')'}.
+ whitespace '(' whitespace (item whitespace)+ ')'}.
Permitted in \t{REQUIRED_USE}.
\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
+ one 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
+ (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.
\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
+ an open parenthesis, followed by whitespace, followed by one 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)* ')'}.
+ whitespace)+ ')'}.
Permitted in all specification style variables.
\end{compactitem}
--
2.14.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-10-02 16:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-02 16:52 [gentoo-pms] [PATCH] Ban empty groups in dependency specifications Michał Górny
-- strict thread matches above, loose matches on Subject: below --
2017-08-23 17:48 Ulrich Müller
2017-10-02 16:45 ` Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox