diff options
author | Michał Górny <mgorny@gentoo.org> | 2017-10-04 18:10:08 +0200 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2018-04-01 15:45:07 +0200 |
commit | ffdf410a314633d97a63a5cbeca62b716a958434 (patch) | |
tree | 271dec4fffcb2da9c274cab8eacef689d0481bb7 | |
parent | EAPI 7 has binding-any-of dep groups (||=). (diff) | |
download | pms-ffdf410a314633d97a63a5cbeca62b716a958434.tar.gz pms-ffdf410a314633d97a63a5cbeca62b716a958434.tar.bz2 pms-ffdf410a314633d97a63a5cbeca62b716a958434.zip |
EAPI 7 has automatic USE enforcing.
Bug: https://bugs.gentoo.org/609338
-rw-r--r-- | dependencies.tex | 67 | ||||
-rw-r--r-- | eapi-differences.tex | 4 |
2 files changed, 70 insertions, 1 deletions
diff --git a/dependencies.tex b/dependencies.tex index cc4d2b3..cea06d6 100644 --- a/dependencies.tex +++ b/dependencies.tex @@ -367,10 +367,75 @@ flags to be valid for this ebuild. In order to be matched, a \t{USE} flag in a t must be enabled (or disabled if it has an exclamation mark prefix). If the package manager encounters a package version where \t{REQUIRED_USE} assertions are not met, -it must treat this package version as if it was masked. No phase functions must be called. +it should attempt to automatically enforce the necessary flags as detailed +in section~\ref{sec:enforce-required-use}. If this feature is not supported or it fails to resolve +the problem, the package manager must treat this package version as if it was masked. No phase +functions must be called in that case. It is an error for a flag to be used if it is not included in \t{IUSE_EFFECTIVE}. +\subsubsection{Automatic enforcing of REQUIRED_USE} +\label{sec:enforce-required-use} + +\featurelabel{auto-req-use} In EAPIs listed in table~\ref{tab:enforce-required-use} as supporting +enforcing of \t{REQUIRED_USE}, the package manager can attempt to resolve unmet USE state +constraints through automatically adjusting the effective USE flags for the package being built, +according to the algorithm specified below. Any adjustments done this way must not affect +the package version permanently. The package manager must reevaluate the flags using the original +user configuration every time the package is being built. + +The package flags that are either masked or forced according to section~\ref{sec:use-masking} are +considered immutable. The enforcing process must not alter the values of immutable flags. If the +\t{REQUIRED_USE} constraint can not be satisfied without altering immutable flags, automatic +enforcing fails. + +In order to enforce \t{REQUIRED_USE}, the package manager should process every USE constraint, +in order of listing, according to the following rules: + +\begin{compactitem} +\item For an unmatched use flag, the package manager should negate the state of the specified flag + in order to make the constraint match. +\item For an unmatched all-of group, the package manager should recursively enforce all constraints + inside the group, in order of listing. +\item For an unmatched use-conditional group, the package manager should recursively enforce all + constraints inside the group, in order of listing. The associated condition flag is not altered. +\item For an unmatched any-of group, the package manager should recursively enforce the first item + inside the group that can be enforced without altering immutable flags, in order of listing. +\item For an unmatched at-most-one-of group: + \begin{compactitem} + \item If two or more items match due to immutable flags, the package manager must report + failure. + \item If exactly one of the items match due to immutable flags, the package manager should + enforce all other items not to match, according to the rule specified below. + \item If none of the items match due to immutable flags, the package manager should enforce all + items not to match but the first item in order of listing that matches currently. + \end{compactitem} +\item For an unmatched exactly-one-of group: + \begin{compactitem} + \item If none of the items match, the package manager should behave as for unmatched any-of + group. + \item If more than one item matches, the package manager should behave as for unmatched + at-most-one-of group. + \end{compactitem} +\end{compactitem} + +In order to enforce a matched use flag item not to match, the package manager should negate +the state of the flag. The method of enforcing any other item type not to match is undefined. + +\ChangeWhenAddingAnEAPI{7} +\begin{centertable}{EAPIs supporting automatic enforcing of \t{REQUIRED_USE}} + \label{tab:enforce-required-use} + \begin{tabular}{ll} + \toprule + \multicolumn{1}{c}{\textbf{EAPI}} & + \multicolumn{1}{c}{\textbf{Supports enforcing \t{REQUIRED_USE}?}} \\ + \midrule + 0, 1, 2, 3, 4, 5, 6 & No \\ + 7 & Yes \\ + \bottomrule + \end{tabular} +\end{centertable} + \subsection{Restrict} \label{sec:restrict} diff --git a/eapi-differences.tex b/eapi-differences.tex index 4a99ebc..0e4bd64 100644 --- a/eapi-differences.tex +++ b/eapi-differences.tex @@ -89,6 +89,9 @@ Use dependencies & \compactfeatureref{use-deps} & \t{!!}\ blockers & \compactfeatureref{bang-strength} & * & Strong & Strong & Strong & Strong \\ +\t{REQUIRED_USE} autoenforced & \compactfeatureref{auto-req-use} & + No & No & No & No & Yes \\ + \t{S} to \t{WORKDIR} fallback & \compactfeatureref{s-workdir-fallback} & Always & Conditional & Conditional & Conditional & Conditional \\ @@ -376,6 +379,7 @@ EAPI 7 is EAPI 6 with the following changes: \item Bash version is 4.3, \featureref{bash-version}. \item Runtime-modifiable USE flags (\t{IUSE_RUNTIME}), \featureref{iuse-runtime}. \item \t{||=} dependency groups, \featureref{binding-any-of}. +\item Automatic enforcing of \t{REQUIRED_USE}, \featureref{auto-req-use}. \end{compactitem} \ChangeWhenAddingAnEAPI{7} |