1 |
From: James Le Cuirot <chewi@g.o> |
2 |
|
3 |
Bug: https://bugs.gentoo.org/317337 |
4 |
--- |
5 |
eapi-differences.tex | 8 +++++--- |
6 |
pkg-mgr-commands.tex | 30 ++++++++++++++++++++---------- |
7 |
2 files changed, 25 insertions(+), 13 deletions(-) |
8 |
|
9 |
diff --git a/eapi-differences.tex b/eapi-differences.tex |
10 |
index af28b7a..ace1f55 100644 |
11 |
--- a/eapi-differences.tex |
12 |
+++ b/eapi-differences.tex |
13 |
@@ -202,8 +202,8 @@ Most utilities die & \compactfeatureref{die-on-failure} & |
14 |
\t{dohtml} & \compactfeatureref{banned-commands} & |
15 |
Yes & Yes & Yes & Yes & Banned \\ |
16 |
|
17 |
-Option \t{-{}-host-root} & \compactfeatureref{host-root-option} & |
18 |
- No & No & Yes & Yes & Yes \\ |
19 |
+PM query options & \compactfeatureref{pm-query-options} & |
20 |
+ No & No & \t{-{}-host-root} & \t{-{}-host-root} & \t{-b}, \t{-d}, \t{-r} \\ |
21 |
|
22 |
\t{die -n} & \compactfeatureref{nonfatal-die} & |
23 |
No & No & No & Yes & Yes \\ |
24 |
@@ -368,7 +368,7 @@ EAPI 5 is EAPI 4 with the following changes: |
25 |
\item \t{USE} is calculated differently, \featureref{profile-iuse-inject}. |
26 |
\item \t{find} is guaranteed to be GNU, \featureref{gnu-find}. |
27 |
\item \t{best_version} and \t{has_version} support the \t{-{}-host-root} option, |
28 |
- \featureref{host-root-option}. |
29 |
+ \featureref{pm-query-options}. |
30 |
\item \t{econf} adds \t{-{}-disable-silent-rules}, \featureref{econf-options}. |
31 |
\item \t{doheader} and \t{newheader} support, \featureref{doheader}. |
32 |
\item \t{new*} can read from standard input, \featureref{newfoo-stdin}. |
33 |
@@ -417,6 +417,8 @@ EAPI 7 is EAPI 6 with the following changes: |
34 |
\item \t{econf} adds \t{-{}-with-sysroot}, \featureref{econf-options}. |
35 |
\item \t{BDEPEND}, \featureref{bdepend}. |
36 |
\item \t{BROOT}, \featureref{broot}. |
37 |
+\item \t{best_version} and \t{has_version} drops the \t{-{}-host-root} option in favor of the |
38 |
+ \t{-b}, \t{-d}, and \t{-r} options, \featureref{pm-query-options}. |
39 |
\end{compactitem} |
40 |
|
41 |
\ChangeWhenAddingAnEAPI{7} |
42 |
diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex |
43 |
index 6a4415d..8ab8175 100644 |
44 |
--- a/pkg-mgr-commands.tex |
45 |
+++ b/pkg-mgr-commands.tex |
46 |
@@ -84,27 +84,37 @@ These commands are used to extract information about the system. Ebuilds must no |
47 |
these commands in parallel with any other package manager command. Ebuilds must not run any of |
48 |
these commands once the current phase function has returned. |
49 |
|
50 |
-\featurelabel{host-root-option} In EAPIs listed in table~\ref{tab:foo-version-host-root-table} as |
51 |
-supporting option \t{-{}-host-root}, this flag as the first argument will cause the query to apply |
52 |
-to the host root instead of \t{ROOT}. |
53 |
+\featurelabel{pm-query-options} In EAPIs listed in table~\ref{tab:pm-query-options-table} |
54 |
+as supporting options \t{-b}, \t{-d}, and \t{-r}, these flags as the first argument will cause |
55 |
+the query to apply to locations targetted by \t{BDEPEND}, \t{DEPEND}, and \t{RDEPEND} respectively. |
56 |
+When none of these options are given, \t{-r} is assumed. |
57 |
+ |
58 |
+In EAPIs listed in table~\ref{tab:pm-query-options-table} as supporting option \t{-{}-host-root}, |
59 |
+this flag as the first argument will cause the query to apply to the host root. Otherwise, it |
60 |
+applies to \t{ROOT}. |
61 |
+ |
62 |
\begin{description} |
63 |
\item[has_version] Takes exactly one package dependency specification as an argument. Returns |
64 |
- true if a package matching the specification is installed in \t{ROOT}, and false otherwise. |
65 |
+ true if a package matching the specification is installed, and false otherwise. |
66 |
\item[best_version] Takes exactly one package dependency specification as an argument. If a |
67 |
matching package is installed, prints the category, package name and version of the highest |
68 |
matching version; otherwise, prints an empty string. The exit code is unspecified. |
69 |
\end{description} |
70 |
|
71 |
\ChangeWhenAddingAnEAPI{7} |
72 |
-\begin{centertable}{EAPIs supporting \t{-{}-host-root} for \t{*_version} commands} |
73 |
- \label{tab:foo-version-host-root-table} |
74 |
- \begin{tabular}{ll} |
75 |
+\begin{centertable}{Package manager query command options supported by EAPIs} |
76 |
+ \label{tab:pm-query-options-table} |
77 |
+ \begin{tabular}{lllll} |
78 |
\toprule |
79 |
\multicolumn{1}{c}{\textbf{EAPI}} & |
80 |
- \multicolumn{1}{c}{\textbf{\t{*_version} supports \t{-{}-host-root}?}} \\ |
81 |
+ \multicolumn{1}{c}{\textbf{\t{-{}-host-root}?}} & |
82 |
+ \multicolumn{1}{c}{\textbf{\t{-b}?}} & |
83 |
+ \multicolumn{1}{c}{\textbf{\t{-d}?}} & |
84 |
+ \multicolumn{1}{c}{\textbf{\t{-r}?}} \\ |
85 |
\midrule |
86 |
- 0, 1, 2, 3, 4 & No \\ |
87 |
- 5, 6 & Yes \\ |
88 |
+ 0, 1, 2, 3, 4 & No & No & No & No \\ |
89 |
+ 5, 6 & Yes & No & No & No \\ |
90 |
+ 7 & No & Yes & Yes & Yes \\ |
91 |
\bottomrule |
92 |
\end{tabular} |
93 |
\end{centertable} |
94 |
-- |
95 |
2.14.2 |