Gentoo Archives: gentoo-commits

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