public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [gentoo-commits] proj/pms:eapi-7 commit in: /
@ 2018-02-24 12:58 99% Ulrich Müller
  0 siblings, 0 replies; 1+ results
From: Ulrich Müller @ 2018-02-24 12:58 UTC (permalink / raw
  To: gentoo-commits

commit:     ed38165fb16dfbb7fed458d63530382d59643493
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 28 16:20:11 2017 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Feb 24 12:55:24 2018 +0000
URL:        https://gitweb.gentoo.org/proj/pms.git/commit/?id=ed38165f

EAPI 7 no longer adds trailing slash to ROOT, EROOT, D, ED.

Bug: https://bugs.gentoo.org/465772

 eapi-differences.tex |  5 +++++
 ebuild-env-vars.tex  | 58 ++++++++++++++++++++++++++++++++++++++++++----------
 2 files changed, 52 insertions(+), 11 deletions(-)

diff --git a/eapi-differences.tex b/eapi-differences.tex
index 283891b..21411eb 100644
--- a/eapi-differences.tex
+++ b/eapi-differences.tex
@@ -185,6 +185,9 @@ Profile \t{IUSE} injection & \compactfeatureref{profile-iuse-inject} &
 \t{EPREFIX}, \t{ED}, \t{EROOT} & \compactfeatureref{offset-prefix-vars} &
     * & Yes & Yes & Yes & Yes \\
 
+Trailing slash in \t{D} etc. & \compactfeatureref{trailing-slash} &
+    Yes & Yes & Yes & Yes & No \\
+
 \t{find} is GNU? & \compactfeatureref{gnu-find} &
     Undefined & Undefined & Yes & Yes & Yes \\
 
@@ -417,6 +420,8 @@ EAPI 7 is EAPI 6 with the following changes:
 \item \t{ECLASSDIR} is gone, \featureref{eclassdir}.
 \item \t{DESTTREE} is gone, \featureref{desttree}.
 \item \t{INSDESTTREE} is gone, \featureref{insdesttree}.
+\item \t{ROOT}, \t{EROOT}, \t{D}, \t{ED} no longer end with a trailing slash,
+    \featureref{trailing-slash}.
 \end{compactitem}
 
 \ChangeWhenAddingAnEAPI{7}

diff --git a/ebuild-env-vars.tex b/ebuild-env-vars.tex
index 2d79f20..27417bf 100644
--- a/ebuild-env-vars.tex
+++ b/ebuild-env-vars.tex
@@ -123,14 +123,15 @@ variable.
    The absolute path to the root directory into which the package is to be merged.  Phases which run
    with full filesystem access must not touch any files outside of the directory given in
    \t{ROOT}\@. Also of note is that in a cross-compiling environment, binaries inside of \t{ROOT}
-   will not be executable on the build machine, so ebuilds must not call them. \t{ROOT} must be
-   non-empty and end in a trailing slash. \\
+   will not be executable on the build machine, so ebuilds must not call them. The presence of
+   a trailing slash is EAPI dependent as listed in table~\ref{tab:trailing-slash}. \\
 \t{EROOT} &
     \t{pkg_*} &
     No &
-    Contains the path \t{\$\{ROOT\%/\}\$\{EPREFIX\}/} for convenience. See also the
-    \t{EPREFIX} variable. Only for EAPIs listed in table~\ref{tab:offset-env-vars-table} as
-    supporting \t{EROOT}. \\
+    Contains the concatenation of the paths in the \t{ROOT} and \t{EPREFIX} variables,
+    for convenience. See also the \t{EPREFIX} variable. Only for EAPIs listed in
+    table~\ref{tab:offset-env-vars-table} as supporting \t{EROOT}\@. The presence of a trailing
+    slash is EAPI dependent as listed in table~\ref{tab:trailing-slash}. \\
 \t{T} &
     All &
     Partially\footnote{Consistent and preserved across a single connected sequence of install or
@@ -161,18 +162,21 @@ variable.
     \t{src_install} &
     No &
     Contains the full path to the image directory into which the package should be installed.
-    Must be non-empty and end in a trailing slash. \\
+    The presence of a trailing slash is EAPI dependent as listed in table~\ref{tab:trailing-slash}.
+    \\
 \t{D} (continued) &
     \t{pkg_preinst}, \t{pkg_postinst} &
     Yes &
-    Contains the full path to the image that is about to be or has just been merged. Must be
-    non-empty and end in a trailing slash. \\
+    Contains the full path to the image that is about to be or has just been merged.
+    The presence of a trailing slash is EAPI dependent as listed in table~\ref{tab:trailing-slash}.
+    \\
 \t{ED} &
     \t{src_install}, \t{pkg_preinst}, \t{pkg_postinst} &
     See \t{D} &
-    Contains the path \t{\$\{D\%/\}\$\{EPREFIX\}/} for convenience. See also the
-    \t{EPREFIX} variable. Only for EAPIs listed in table~\ref{tab:offset-env-vars-table} as
-    supporting \t{ED}. \\
+    Contains the concatenation of the paths in the \t{D} and \t{EPREFIX} variables,
+    for convenience. See also the \t{EPREFIX} variable. Only for EAPIs listed in
+    table~\ref{tab:offset-env-vars-table} as supporting \t{ED}\@. The presence of a trailing slash
+    is EAPI dependent as listed in table~\ref{tab:trailing-slash}. \\
 \t{DESTTREE} &
     \t{src_install} &
     No &
@@ -433,6 +437,38 @@ behaviour of offset-prefix aware and agnostic is the same when \t{EPREFIX} is se
 string in offset-prefix aware EAPIs. The latter do have the variables \t{ED} and \t{EROOT} properly
 set, though.
 
+\subsection{Path variables and trailing slash}
+\label{sec:trailing-slash}
+
+Unless specified otherwise, the paths provided through package manager variables do not end with
+a trailing slash and cannot be empty. A few exceptions to that rule are listed
+in table~\ref{tab:trailing-slash} along with applicable EAPIs.
+
+For EAPIs where those variables are defined to always end with a trailing slash, the package manager
+guarantees that a trailing slash will always be appended to the path in question. If the path
+specifies the system root directory, it will consist of a single slash (\t{/}).
+
+\featurelabel{trailing-slash} For EAPIs where those variables are defined to never end with
+a trailing slash, the package manager guarantees that a trailing slash will never be present.
+If the path specifies the system root directory, it will be empty.
+
+\ChangeWhenAddingAnEAPI{7}
+\begin{centertable}{Variables that always or never end with a trailing slash}
+    \label{tab:trailing-slash}
+    \begin{tabular}{lll}
+      \toprule
+      \multicolumn{1}{c}{\textbf{EAPI}} &
+      \multicolumn{2}{c}{\textbf{Ends with a trailing slash?}} \\
+      &
+      \t{ROOT}, \t{EROOT} &
+      \t{D}, \t{ED} \\
+      \midrule
+      0, 1, 2, 3, 4, 5, 6 & always & always \\
+      7                   & never  & never  \\
+      \bottomrule
+    \end{tabular}
+\end{centertable}
+
 % vim: set filetype=tex fileencoding=utf8 et tw=100 spell spelllang=en :
 
 %%% Local Variables:


^ permalink raw reply related	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2018-02-24 12:58 99% [gentoo-commits] proj/pms:eapi-7 commit in: / Ulrich Müller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox