From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-975452-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 577B21396D2 for <garchives@archives.gentoo.org>; Thu, 28 Sep 2017 16:58:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 773112BC003; Thu, 28 Sep 2017 16:58:27 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 46FB5E0841 for <gentoo-commits@lists.gentoo.org>; Thu, 28 Sep 2017 16:58:27 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9B0663416EC for <gentoo-commits@lists.gentoo.org>; Thu, 28 Sep 2017 16:58:25 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EE2E39093 for <gentoo-commits@lists.gentoo.org>; Thu, 28 Sep 2017 16:58:23 +0000 (UTC) From: "Michał Górny" <mgorny@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" <mgorny@gentoo.org> Message-ID: <1506616603.16ab106d3059b88d0025ffee72901f8de3f69eb5.mgorny@gentoo> Subject: [gentoo-commits] proj/pms:eapi-7 commit in: / X-VCS-Repository: proj/pms X-VCS-Files: eapi-differences.tex ebuild-env-vars.tex X-VCS-Directories: / X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 16ab106d3059b88d0025ffee72901f8de3f69eb5 X-VCS-Branch: eapi-7 Date: Thu, 28 Sep 2017 16:58:23 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 1f7f88ee-1017-472d-a79e-77b2a1b09103 X-Archives-Hash: 3f4953e9a46ed435ca2343faa4bb3517 commit: 16ab106d3059b88d0025ffee72901f8de3f69eb5 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Thu Sep 28 16:20:11 2017 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Thu Sep 28 16:36:43 2017 +0000 URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=16ab106d 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 055e6c6..939c501 100644 --- a/eapi-differences.tex +++ b/eapi-differences.tex @@ -41,6 +41,9 @@ of this document for a complete table of previous EAPIs. \bottomrule \endlastfoot +Trailing slash in \t{ROOT}, \t{D}... & \compactfeatureref{trailing-slash} & + Yes & Yes & Yes & Yes & No \\ + Output cmds can use stdout & \compactfeatureref{output-no-stdout} & Yes & Yes & Yes & Yes & No \\ @@ -395,6 +398,8 @@ EAPI 7 is EAPI 6 with the following changes: \item Version manipulation and comparison functions added, \featureref{ver-functions}. \item \t{eqawarn} added, \featureref{eqawarn}. \item Output commands can no longer use stdout, \featureref{output-no-stdout}. +\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 1851aba..fe61ac5 100644 --- a/ebuild-env-vars.tex +++ b/ebuild-env-vars.tex @@ -121,14 +121,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 \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 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 @@ -159,18 +160,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 \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 EAPI-dependent as listed in table~\ref{tab:trailing-slash}. \\ \t{DESTTREE} & \t{src_install} & No & @@ -420,6 +424,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 can not 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: