1 |
commit: 16ab106d3059b88d0025ffee72901f8de3f69eb5 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 28 16:20:11 2017 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 28 16:36:43 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=16ab106d |
7 |
|
8 |
EAPI 7 no longer adds trailing slash to ROOT, EROOT, D, ED. |
9 |
|
10 |
Bug: https://bugs.gentoo.org/465772 |
11 |
|
12 |
eapi-differences.tex | 5 +++++ |
13 |
ebuild-env-vars.tex | 58 ++++++++++++++++++++++++++++++++++++++++++---------- |
14 |
2 files changed, 52 insertions(+), 11 deletions(-) |
15 |
|
16 |
diff --git a/eapi-differences.tex b/eapi-differences.tex |
17 |
index 055e6c6..939c501 100644 |
18 |
--- a/eapi-differences.tex |
19 |
+++ b/eapi-differences.tex |
20 |
@@ -41,6 +41,9 @@ of this document for a complete table of previous EAPIs. |
21 |
\bottomrule |
22 |
\endlastfoot |
23 |
|
24 |
+Trailing slash in \t{ROOT}, \t{D}... & \compactfeatureref{trailing-slash} & |
25 |
+ Yes & Yes & Yes & Yes & No \\ |
26 |
+ |
27 |
Output cmds can use stdout & \compactfeatureref{output-no-stdout} & |
28 |
Yes & Yes & Yes & Yes & No \\ |
29 |
|
30 |
@@ -395,6 +398,8 @@ EAPI 7 is EAPI 6 with the following changes: |
31 |
\item Version manipulation and comparison functions added, \featureref{ver-functions}. |
32 |
\item \t{eqawarn} added, \featureref{eqawarn}. |
33 |
\item Output commands can no longer use stdout, \featureref{output-no-stdout}. |
34 |
+\item \t{ROOT}, \t{EROOT}, \t{D}, \t{ED} no longer end with a trailing slash, |
35 |
+ \featureref{trailing-slash}. |
36 |
\end{compactitem} |
37 |
|
38 |
\ChangeWhenAddingAnEAPI{7} |
39 |
|
40 |
diff --git a/ebuild-env-vars.tex b/ebuild-env-vars.tex |
41 |
index 1851aba..fe61ac5 100644 |
42 |
--- a/ebuild-env-vars.tex |
43 |
+++ b/ebuild-env-vars.tex |
44 |
@@ -121,14 +121,15 @@ variable. |
45 |
The absolute path to the root directory into which the package is to be merged. Phases which run |
46 |
with full filesystem access must not touch any files outside of the directory given in |
47 |
\t{ROOT}\@. Also of note is that in a cross-compiling environment, binaries inside of \t{ROOT} |
48 |
- will not be executable on the build machine, so ebuilds must not call them. \t{ROOT} must be |
49 |
- non-empty and end in a trailing slash. \\ |
50 |
+ will not be executable on the build machine, so ebuilds must not call them. The presence of |
51 |
+ a trailing slash is EAPI-dependent as listed in table~\ref{tab:trailing-slash}. \\ |
52 |
\t{EROOT} & |
53 |
\t{pkg_*} & |
54 |
No & |
55 |
- Contains the path \t{\$\{ROOT\%/\}\$\{EPREFIX\}/} for convenience. See also the |
56 |
- \t{EPREFIX} variable. Only for EAPIs listed in table~\ref{tab:offset-env-vars-table} as |
57 |
- supporting \t{EROOT}. \\ |
58 |
+ Contains the concatenation of the paths in \t{ROOT} and \t{EPREFIX} variables, for convenience. |
59 |
+ See also the \t{EPREFIX} variable. Only for EAPIs listed |
60 |
+ in table~\ref{tab:offset-env-vars-table} as supporting \t{EROOT}. The presence of a trailing |
61 |
+ slash EAPI-dependent as listed in table~\ref{tab:trailing-slash}. \\ |
62 |
\t{T} & |
63 |
All & |
64 |
Partially\footnote{Consistent and preserved across a single connected sequence of install or |
65 |
@@ -159,18 +160,21 @@ variable. |
66 |
\t{src_install} & |
67 |
No & |
68 |
Contains the full path to the image directory into which the package should be installed. |
69 |
- Must be non-empty and end in a trailing slash. \\ |
70 |
+ The presence of a trailing slash is EAPI-dependent as listed in table~\ref{tab:trailing-slash}. |
71 |
+ \\ |
72 |
\t{D} (continued) & |
73 |
\t{pkg_preinst}, \t{pkg_postinst} & |
74 |
Yes & |
75 |
- Contains the full path to the image that is about to be or has just been merged. Must be |
76 |
- non-empty and end in a trailing slash. \\ |
77 |
+ Contains the full path to the image that is about to be or has just been merged. |
78 |
+ The presence of a trailing slash is EAPI-dependent as listed in table~\ref{tab:trailing-slash}. |
79 |
+ \\ |
80 |
\t{ED} & |
81 |
\t{src_install}, \t{pkg_preinst}, \t{pkg_postinst} & |
82 |
See \t{D} & |
83 |
- Contains the path \t{\$\{D\%/\}\$\{EPREFIX\}/} for convenience. See also the |
84 |
- \t{EPREFIX} variable. Only for EAPIs listed in table~\ref{tab:offset-env-vars-table} as |
85 |
- supporting \t{ED}. \\ |
86 |
+ Contains the concatenation of the paths in \t{D} and \t{EPREFIX} variables, for convenience. |
87 |
+ See also the \t{EPREFIX} variable. Only for EAPIs listed |
88 |
+ in table~\ref{tab:offset-env-vars-table} as supporting \t{ED}. The presence of a trailing |
89 |
+ slash EAPI-dependent as listed in table~\ref{tab:trailing-slash}. \\ |
90 |
\t{DESTTREE} & |
91 |
\t{src_install} & |
92 |
No & |
93 |
@@ -420,6 +424,38 @@ behaviour of offset-prefix aware and agnostic is the same when \t{EPREFIX} is se |
94 |
string in offset-prefix aware EAPIs. The latter do have the variables \t{ED} and \t{EROOT} properly |
95 |
set, though. |
96 |
|
97 |
+\subsection{Path variables and trailing slash} |
98 |
+\label{sec:trailing-slash} |
99 |
+ |
100 |
+Unless specified otherwise, the paths provided through package manager variables do not end with |
101 |
+a trailing slash and can not be empty. A few exceptions to that rule are listed |
102 |
+in table~\ref{tab:trailing-slash} along with applicable EAPIs. |
103 |
+ |
104 |
+For EAPIs where those variables are defined to always end with a trailing slash, the package manager |
105 |
+guarantees that a trailing slash will always be appended to the path in question. If the path |
106 |
+specifies the system root directory, it will consist of a single slash (\t{/}). |
107 |
+ |
108 |
+\featurelabel{trailing-slash} For EAPIs where those variables are defined to never end with |
109 |
+a trailing slash, the package manager guarantees that a trailing slash will never be present. |
110 |
+If the path specifies the system root directory, it will be empty. |
111 |
+ |
112 |
+\ChangeWhenAddingAnEAPI{7} |
113 |
+\begin{centertable}{Variables that always or never end with a trailing slash} |
114 |
+ \label{tab:trailing-slash} |
115 |
+ \begin{tabular}{lll} |
116 |
+ \toprule |
117 |
+ \multicolumn{1}{c}{\textbf{EAPI}} & |
118 |
+ \multicolumn{2}{c}{\textbf{Ends with a trailing slash?}} \\ |
119 |
+ & |
120 |
+ \t{ROOT}, \t{EROOT} & |
121 |
+ \t{D}, \t{ED} \\ |
122 |
+ \midrule |
123 |
+ 0, 1, 2, 3, 4, 5, 6 & always & always \\ |
124 |
+ 7 & never & never \\ |
125 |
+ \bottomrule |
126 |
+ \end{tabular} |
127 |
+\end{centertable} |
128 |
+ |
129 |
% vim: set filetype=tex fileencoding=utf8 et tw=100 spell spelllang=en : |
130 |
|
131 |
%%% Local Variables: |