Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/pms:eapi-8 commit in: /
Date: Tue, 18 May 2021 05:44:42
Message-Id: 1621316655.5b70b4ccd99022bd2761e9e9215eaf91588a43f5.ulm@gentoo
1 commit: 5b70b4ccd99022bd2761e9e9215eaf91588a43f5
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Sun May 16 18:59:37 2021 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Tue May 18 05:44:15 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=5b70b4cc
7
8 EAPI 8: usev has an optional second argument
9
10 Bug: https://bugs.gentoo.org/744868
11 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
12
13 eapi-differences.tex | 4 ++++
14 pkg-mgr-commands.tex | 23 ++++++++++++++---------
15 2 files changed, 18 insertions(+), 9 deletions(-)
16
17 diff --git a/eapi-differences.tex b/eapi-differences.tex
18 index 5abc5e4..0f9986d 100644
19 --- a/eapi-differences.tex
20 +++ b/eapi-differences.tex
21 @@ -314,6 +314,9 @@ Controllable stripping & \compactfeatureref{dostrip} &
22 \t{dostrip} & \compactfeatureref{dostrip} &
23 No & No & No & Yes & Yes \\
24
25 +\t{usev} second arg & \compactfeatureref{usev} &
26 + No & No & No & No & Yes \\
27 +
28 \t{use_with} empty third arg & \compactfeatureref{use-with} &
29 * & Yes & Yes & Yes & Yes \\
30
31 @@ -525,6 +528,7 @@ EAPI 8 is EAPI 7 with the following changes:
32 \item \t{dosym} can create relative paths, \featureref{dosym-relative}.
33 \item \t{insopts} no longer affects \t{doconfd}, \t{doenvd} and \t{doheader}, \featureref{insopts}.
34 \item \t{exeopts} no longer affects \t{doinitd}, \featureref{exeopts}.
35 +\item \t{usev} supports an optional second argument, \featureref{usev}.
36 \end{compactitem}
37
38 \ChangeWhenAddingAnEAPI{8}
39
40 diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex
41 index 4e2c0fd..a0a4f33 100644
42 --- a/pkg-mgr-commands.tex
43 +++ b/pkg-mgr-commands.tex
44 @@ -948,15 +948,17 @@ table~\ref{tab:use-list-strictness}.
45 \item[use] Returns shell true (0) if the first argument (a \t{USE} flag name) is enabled, false
46 otherwise. If the flag name is prefixed with \t{!}, returns true if the flag is disabled, and
47 false if it is enabled. It is guaranteed that this command is quiet.
48 -\item[usev] The same as \t{use}, but also prints the flag name if the condition
49 - is met.
50 +\item[usev] \featurelabel{usev} The same as \t{use}, but also prints the flag name if the condition
51 + is met. In EAPIs listed in table~\ref{tab:use-list-args} as supporting an optional second
52 + argument for \t{usev}, prints the second argument instead, if it is specified and if the
53 + condition is met.
54 \item[useq] Deprecated synonym for \t{use}.
55 In EAPIs listed in table~\ref{tab:banned-commands-2}, this command is banned as per
56 section~\ref{sec:banned-commands}.
57 \item[use_with] \featurelabel{use-with} Has one-, two-, and three-argument forms. The first
58 argument is a USE flag name, the second a \t{configure} option name (\t{\$\{opt\}}), defaulting
59 to the same as the first argument if not provided, and the third is a string value
60 - (\t{\$\{value\}}). For EAPIs listed in table~\ref{tab:use-with-third-arg} as not supporting it,
61 + (\t{\$\{value\}}). For EAPIs listed in table~\ref{tab:use-list-args} as not supporting it,
62 an empty third argument is treated as if it weren't provided. If the USE flag is set, outputs
63 \t{-{}-with-\$\{opt\}=\$\{value\}} if the third argument was provided, and
64 \t{-{}-with-\$\{opt\}} otherwise. If the flag is not set, then it outputs
65 @@ -991,15 +993,18 @@ table~\ref{tab:use-list-strictness}.
66 \end{centertable}
67
68 \ChangeWhenAddingAnEAPI{8}
69 -\begin{centertable}{EAPIs supporting empty third argument in \t{use_with} and \t{use_enable}}
70 - \label{tab:use-with-third-arg}
71 - \begin{tabular}{ll}
72 +\begin{centertable}{\t{usev}, \t{use_with} and \t{use_enable} arguments for EAPIs}
73 + \label{tab:use-list-args}
74 + \begin{tabular}{lll}
75 \toprule
76 \multicolumn{1}{c}{\textbf{EAPI}} &
77 - \multicolumn{1}{c}{\textbf{Supports empty third argument?}} \\
78 + \multicolumn{1}{P{8em}}{\textbf{\t{usev} has optional second argument?}} &
79 + \multicolumn{1}{P{14em}}{\textbf{\t{use_with} and \t{use_enable} support empty third
80 + argument?}} \\
81 \midrule
82 - 0, 1, 2, 3 & No \\
83 - 4, 5, 6, 7, 8 & Yes \\
84 + 0, 1, 2, 3 & No & No \\
85 + 4, 5, 6, 7 & No & Yes \\
86 + 8 & Yes & Yes \\
87 \bottomrule
88 \end{tabular}
89 \end{centertable}