Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/pms:eapi-7 commit in: /
Date: Sat, 24 Feb 2018 12:58:50
Message-Id: 1519476924.ed38165fb16dfbb7fed458d63530382d59643493.ulm@gentoo
1 commit: ed38165fb16dfbb7fed458d63530382d59643493
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 28 16:20:11 2017 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 24 12:55:24 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=ed38165f
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 283891b..21411eb 100644
18 --- a/eapi-differences.tex
19 +++ b/eapi-differences.tex
20 @@ -185,6 +185,9 @@ Profile \t{IUSE} injection & \compactfeatureref{profile-iuse-inject} &
21 \t{EPREFIX}, \t{ED}, \t{EROOT} & \compactfeatureref{offset-prefix-vars} &
22 * & Yes & Yes & Yes & Yes \\
23
24 +Trailing slash in \t{D} etc. & \compactfeatureref{trailing-slash} &
25 + Yes & Yes & Yes & Yes & No \\
26 +
27 \t{find} is GNU? & \compactfeatureref{gnu-find} &
28 Undefined & Undefined & Yes & Yes & Yes \\
29
30 @@ -417,6 +420,8 @@ EAPI 7 is EAPI 6 with the following changes:
31 \item \t{ECLASSDIR} is gone, \featureref{eclassdir}.
32 \item \t{DESTTREE} is gone, \featureref{desttree}.
33 \item \t{INSDESTTREE} is gone, \featureref{insdesttree}.
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 2d79f20..27417bf 100644
42 --- a/ebuild-env-vars.tex
43 +++ b/ebuild-env-vars.tex
44 @@ -123,14 +123,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 the \t{ROOT} and \t{EPREFIX} variables,
59 + for convenience. See also the \t{EPREFIX} variable. Only for EAPIs listed in
60 + table~\ref{tab:offset-env-vars-table} as supporting \t{EROOT}\@. The presence of a trailing
61 + slash is 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 @@ -161,18 +162,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 the \t{D} and \t{EPREFIX} variables,
87 + for convenience. See also the \t{EPREFIX} variable. Only for EAPIs listed in
88 + table~\ref{tab:offset-env-vars-table} as supporting \t{ED}\@. The presence of a trailing slash
89 + is EAPI dependent as listed in table~\ref{tab:trailing-slash}. \\
90 \t{DESTTREE} &
91 \t{src_install} &
92 No &
93 @@ -433,6 +437,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 cannot 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: