summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2015-11-08 20:35:59 +0100
committerUlrich Müller <ulm@gentoo.org>2015-11-08 20:35:59 +0100
commitb92a940c1627b64f0eef9dce4fcafb2795f7a414 (patch)
treefece5681134a05c0063dd5700d56bb0763eb34d5
parentUpdate mailing list address. (diff)
parentEAPI 6 has been approved by the Council. (diff)
downloadpms-b92a940c1627b64f0eef9dce4fcafb2795f7a414.tar.gz
pms-b92a940c1627b64f0eef9dce4fcafb2795f7a414.tar.bz2
pms-b92a940c1627b64f0eef9dce4fcafb2795f7a414.zip
Merge branch 'eapi-6'
-rw-r--r--dependencies.tex128
-rw-r--r--eapi-cheatsheet.tex257
-rw-r--r--eapi-differences.tex198
-rw-r--r--eapis.tex18
-rw-r--r--ebuild-env-commands.tex39
-rw-r--r--ebuild-env-vars.tex107
-rw-r--r--ebuild-format.tex30
-rw-r--r--ebuild-functions.tex279
-rw-r--r--ebuild-vars.tex101
-rw-r--r--merge.tex22
-rw-r--r--pkg-mgr-commands.tex615
-rw-r--r--pms.tex4
-rw-r--r--profile-variables.tex25
-rw-r--r--profiles.tex26
14 files changed, 1060 insertions, 789 deletions
diff --git a/dependencies.tex b/dependencies.tex
index 46485fc..a800264 100644
--- a/dependencies.tex
+++ b/dependencies.tex
@@ -89,37 +89,31 @@ be surrounded on both sides by whitespace, except at the start and end of the st
In particular, note that whitespace is not optional.
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{EAPIs supporting \t{SRC\_URI} arrows} \label{tab:uri-arrows-table}
- \begin{tabular}{ l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{Supports \t{SRC\_URI} arrows?}} \\
- \midrule
- \t{0} & No \\
- \t{1} & No \\
- \t{2} & Yes \\
- \t{3} & Yes \\
- \t{4} & Yes \\
- \t{5} & Yes \\
- \bottomrule
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{EAPIs supporting \t{SRC\_URI} arrows}
+ \label{tab:uri-arrows-table}
+ \begin{tabular}{ll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{Supports \t{SRC\_URI} arrows?}} \\
+ \midrule
+ 0, 1 & No \\
+ 2, 3, 4, 5, 6 & Yes \\
+ \bottomrule
\end{tabular}
\end{centertable}
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{EAPIs supporting \t{REQUIRED\_USE ??}\ groups} \label{tab:at-most-one-of-table}
- \begin{tabular}{ l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{Supports \t{REQUIRED\_USE ??}\ groups?}} \\
- \midrule
- \t{0} & No \\
- \t{1} & No \\
- \t{2} & No \\
- \t{3} & No \\
- \t{4} & No \\
- \t{5} & Yes \\
- \bottomrule
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{EAPIs supporting \t{REQUIRED\_USE ??}\ groups}
+ \label{tab:at-most-one-of-table}
+ \begin{tabular}{ll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{Supports \t{REQUIRED\_USE ??}\ groups?}} \\
+ \midrule
+ 0, 1, 2, 3, 4 & No \\
+ 5, 6 & Yes \\
+ \bottomrule
\end{tabular}
\end{centertable}
@@ -189,39 +183,34 @@ manager must warn or error if this feature is used with an EAPI not supporting u
\note Order is important. The slot restriction must come before use dependencies.
-\ChangeWhenAddingAnEAPI{5}
+\ChangeWhenAddingAnEAPI{6}
\begin{centertable}{Support for \t{SLOT} dependencies and sub-slots in EAPIs}
\label{tab:slot-deps-table}
- \begin{tabular}{ l l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{Supports \t{SLOT} dependencies?}} &
- \multicolumn{1}{c}{\textbf{Supports sub-slots?}} \\
- \midrule
- \t{0} & No & No \\
- \t{1} & Named only & No \\
- \t{2} & Named only & No \\
- \t{3} & Named only & No \\
- \t{4} & Named only & No \\
- \t{5} & Named and operator & Yes \\
- \bottomrule
+ \begin{tabular}{lll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{Supports \t{SLOT} dependencies?}} &
+ \multicolumn{1}{c}{\textbf{Supports sub-slots?}} \\
+ \midrule
+ 0 & No & No \\
+ 1, 2, 3, 4 & Named only & No \\
+ 5, 6 & Named and operator & Yes \\
+ \bottomrule
\end{tabular}
\end{centertable}
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{EAPIs supporting \t{USE} dependencies} \label{tab:use-deps-table}
- \begin{tabular}{ l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{Supports \t{USE} dependencies?}} \\
- \midrule
- \t{0} & No \\
- \t{1} & No \\
- \t{2} & 2-style \\
- \t{3} & 2-style \\
- \t{4} & 4-style \\
- \t{5} & 4-style \\
- \bottomrule
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{EAPIs supporting \t{USE} dependencies}
+ \label{tab:use-deps-table}
+ \begin{tabular}{ll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{Supports \t{USE} dependencies?}} \\
+ \midrule
+ 0, 1 & No \\
+ 2, 3 & 2-style \\
+ 4, 5, 6 & 4-style \\
+ \bottomrule
\end{tabular}
\end{centertable}
@@ -259,21 +248,18 @@ ignored by the package manager, so long as any blocked package will be uninstall
strong block must not be ignored. The mapping from one or two exclamation marks to strength is
described in table~\ref{tab:bang-strength-table}.
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{Exclamation mark strengths for EAPIs} \label{tab:bang-strength-table}
- \begin{tabular}{ l l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{\t{!}}} &
- \multicolumn{1}{c}{\textbf{\t{!!}}} \\
- \midrule
- \t{0} & Unspecified & Forbidden \\
- \t{1} & Unspecified & Forbidden \\
- \t{2} & Weak & Strong \\
- \t{3} & Weak & Strong \\
- \t{4} & Weak & Strong \\
- \t{5} & Weak & Strong \\
- \bottomrule
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{Exclamation mark strengths for EAPIs}
+ \label{tab:bang-strength-table}
+ \begin{tabular}{lll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{\t{!}}} &
+ \multicolumn{1}{c}{\textbf{\t{!!}}} \\
+ \midrule
+ 0, 1 & Unspecified & Forbidden \\
+ 2, 3, 4, 5, 6 & Weak & Strong \\
+ \bottomrule
\end{tabular}
\end{centertable}
diff --git a/eapi-cheatsheet.tex b/eapi-cheatsheet.tex
index 136ac5f..97860d6 100644
--- a/eapi-cheatsheet.tex
+++ b/eapi-cheatsheet.tex
@@ -14,15 +14,20 @@
\usepackage[scaled=.90]{helvet}
\newcommand{\code}[1]{\texttt{#1}}
% This should reflect the latest approved EAPI version
-\newcommand{\version}{5.0}
+\newcommand{\version}{6.0}
\newcommand{\featureref}[1]{\textsc{#1} on page~\pageref{feat:#1}}
\renewcommand{\familydefault}{\sfdefault}
\urlstyle{sf}
\externaldocument{pms}
\title{EAPI Cheat Sheet}
-\author{Gentoo PMS team\thanks{%
- \url{https://wiki.gentoo.org/wiki/Project:Package_Manager_Specification}}}
+\author{%
+ Christian Faulhammer \\
+ \href{mailto:fauli@gentoo.org}{fauli@gentoo.org}
+ \and
+ Ulrich Müller \\
+ \href{mailto:ulm@gentoo.org}{ulm@gentoo.org}
+}
\ifthenelse{\equal{\VCDateISO}{}}
{
\date{Version \version{}, generated on: \\\today}
@@ -39,7 +44,7 @@
citecolor=black,
linkcolor=black,
pdftitle={EAPI Desk Reference},
- pdfauthor={Christian Faulhammer},
+ pdfauthor={Christian Faulhammer, Ulrich Müller},
pdfsubject={Making look-up faster for EAPI features},
pdflang={en},
pdfkeywords={Gentoo, package manager, reference},
@@ -51,8 +56,9 @@
\begin{abstract}
An overview of the main EAPI changes in Gentoo, for ebuild
authors. For full details, consult the Package Manager
- Specification found on the project page; this is
- an incomplete summary only.
+ Specification found on the project page;\footnote{%
+ \url{https://wiki.gentoo.org/wiki/Project:Package_Manager_Specification}}
+ this is an incomplete summary only.
Official Gentoo EAPIs are consecutively numbered integers (0, 1,
2, \dots). Except where otherwise noted, an EAPI is the same as
@@ -63,86 +69,88 @@
% Gentoo bug tracking system\footnote{\url{https://bugs.gentoo.org/}}
% to the original author or the PMS team.
- This document is released under the Creative Commons
- Attribution-Share Alike 3.0
- Licence\footnote{\url{http://creativecommons.org/licenses/by-sa/3.0/}}.
+ This work is released under the Creative Commons
+ Attribution-Share Alike 3.0 Licence.%
+ \footnote{\url{http://creativecommons.org/licenses/by-sa/3.0/}}
\end{abstract}
-\section{EAPI 0}
-\label{sec:cs:eapi0}
-If there is no EAPI explicitly specified, EAPI 0 is assumed.
-% Currently there is no full specification what EAPI 0 includes.
-% Portage, official ebuild documentation and existing ebuilds set the
-% standard. If you think you found a bug, you should file a bug report
-% nonetheless.
-\section{EAPI 1}
-\label{sec:cs:eapi1}
-\subsection{Additions/Changes}
-\label{sec:cs:eapi1-additions}
-\begin{description}
- \item[IUSE defaults] A USE flag can be marked as mandatory (if
- not disabled explicitly by user configuration) with a \code{+}
- sign in front. See \featureref{iuse-defaults}.
- \item[Named slot dependencies] Dependencies can explicitly request
- a specific slot by using the
- \code{dev-libs/foo:}\allowbreak\emph{SLOT\_name} syntax.
- See \featureref{slot-deps}.
-\end{description}
+\section{EAPIs 0, 1, and 2}
+\label{sec:cs:eapi0-2}
+Omitted for lack of space. See version~5.0 of this document for
+differences between these previous EAPIs.
-\section{EAPI 2 (2008-09-25)}
-\label{sec:cs:eapi2}
-\subsection{Additions/Changes}
-\label{sec:cs:eapi2-additions}
-\begin{description}
- \item[\code{SRC\_URI} arrows] Allows redirection of upstream file
- naming scheme. By using
- \code{SRC\_URI="http:/\slash some\slash url -> foo"} the file is
- saved as \code{foo} in DISTDIR\@.
- See \featureref{src-uri-arrows}.
- \item[USE dependencies] Dependencies can specify USE flag
- requirements on their target, removing the need for
- \code{built\_with\_use} checks.
- \begin{description}
- \item[{[opt]}] The flag must be enabled.
- \item[{[opt=]}] The flag must be enabled if it is
- enabled for the package with the dependency, or disabled
- otherwise.
- \item[{[!opt=]}] The flag must be disabled if it is
- enabled for the package with the dependency, or enabled
- otherwise.
- \item[{[opt?]}] The flag must be enabled if it is
- enabled for the package with the dependency.
- \item[{[!opt?]}] The flag must be disabled if it is
- disabled for the package with the dependency.
- \item[{[-opt]}] The flag must be disabled.
- \end{description}
- See \featureref{use-deps}.
- \item[Blocker syntax] A single exclamation mark as a blocker may
- be ignored by the package manager as long as the stated package is
- uninstalled later on. Two exclamation marks are a strong blocker
- and will always be respected. See \featureref{bang-strength}.
- \item[\code{src\_configure, src\_prepare}] Both new phases provide
- finer granularity in the ebuild's structure. Configure calls
- should be moved from \code{src\_compile} to \code{src\_configure}.
- Patching and similar preparation must now be done in
- \code{src\_prepare}, not \code{src\_unpack}. See
- \featureref{src-prepare} and \featureref{src-configure}.
- \item[Default phase functions] The default functions for
- phases \code{pkg\_nofetch}, \code{src\_unpack},
- \code{src\_prepare}, \code{src\_configure}, \code{src\_compile}
- and \code{src\_test} can be called via
- \code{default\_}\emph{phasename}, so duplicating the standard
- implementation is no longer necessary for small additions. The
- short-hand \code{default} function calls the current phase's
- \code{default\_} function automatically, so any small additions
- you need will not be accompanied by a complete reimplementation of
- the phase. See \featureref{default-phase-funcs} and
- \featureref{default-func}.
- \item[\code{doman} language support] The \code{doman} installation
- function recognizes language specific man page extensions and
- behaves accordingly. This behaviour can be inhibited by the
- \code{-i18n} switch with EAPI 4. See \featureref{doman-langs}.
-\end{description}
+% \section{EAPI 0}
+% \label{sec:cs:eapi0}
+% If there is no EAPI explicitly specified, EAPI 0 is assumed.
+
+% \section{EAPI 1}
+% \label{sec:cs:eapi1}
+% \subsection{Additions/Changes}
+% \label{sec:cs:eapi1-additions}
+% \begin{description}
+% \item[IUSE defaults] A USE flag can be marked as mandatory (if
+% not disabled explicitly by user configuration) with a \code{+}
+% sign in front. See \featureref{iuse-defaults}.
+% \item[Named slot dependencies] Dependencies can explicitly request
+% a specific slot by using the
+% \code{dev-libs/foo:}\allowbreak\emph{SLOT\_name} syntax.
+% See \featureref{slot-deps}.
+% \end{description}
+
+% \section{EAPI 2 (2008-09-25)}
+% \label{sec:cs:eapi2}
+% \subsection{Additions/Changes}
+% \label{sec:cs:eapi2-additions}
+% \begin{description}
+% \item[\code{SRC\_URI} arrows] Allows redirection of upstream file
+% naming scheme. By using
+% \code{SRC\_URI="http:/\slash some\slash url -> foo"} the file is
+% saved as \code{foo} in DISTDIR\@.
+% See \featureref{src-uri-arrows}.
+% \item[USE dependencies] Dependencies can specify USE flag
+% requirements on their target, removing the need for
+% \code{built\_with\_use} checks.
+% \begin{description}
+% \item[{[opt]}] The flag must be enabled.
+% \item[{[opt=]}] The flag must be enabled if it is
+% enabled for the package with the dependency, or disabled
+% otherwise.
+% \item[{[!opt=]}] The flag must be disabled if it is
+% enabled for the package with the dependency, or enabled
+% otherwise.
+% \item[{[opt?]}] The flag must be enabled if it is
+% enabled for the package with the dependency.
+% \item[{[!opt?]}] The flag must be disabled if it is
+% disabled for the package with the dependency.
+% \item[{[-opt]}] The flag must be disabled.
+% \end{description}
+% See \featureref{use-deps}.
+% \item[Blocker syntax] A single exclamation mark as a blocker may
+% be ignored by the package manager as long as the stated package is
+% uninstalled later on. Two exclamation marks are a strong blocker
+% and will always be respected. See \featureref{bang-strength}.
+% \item[\code{src\_configure, src\_prepare}] Both new phases provide
+% finer granularity in the ebuild's structure. Configure calls
+% should be moved from \code{src\_compile} to \code{src\_configure}.
+% Patching and similar preparation must now be done in
+% \code{src\_prepare}, not \code{src\_unpack}. See
+% \featureref{src-prepare} and \featureref{src-configure}.
+% \item[Default phase functions] The default functions for
+% phases \code{pkg\_nofetch}, \code{src\_unpack},
+% \code{src\_prepare}, \code{src\_configure}, \code{src\_compile}
+% and \code{src\_test} can be called via
+% \code{default\_}\emph{phasename}, so duplicating the standard
+% implementation is no longer necessary for small additions. The
+% short-hand \code{default} function calls the current phase's
+% \code{default\_} function automatically, so any small additions
+% you need will not be accompanied by a complete reimplementation of
+% the phase. See \featureref{default-phase-funcs} and
+% \featureref{default-func}.
+% \item[\code{doman} language support] The \code{doman} installation
+% function recognizes language specific man page extensions and
+% behaves accordingly. This behaviour can be inhibited by the
+% \code{-i18n} switch with EAPI 4. See \featureref{doman-langs}.
+% \end{description}
\section{EAPI 3 (2010-01-18)}
\label{sec:cs:eapi3}
@@ -191,17 +199,17 @@ If there is no EAPI explicitly specified, EAPI 0 is assumed.
adds paths to the inclusion list for compression.
\code{docompress -x path \dots} adds paths to the exclusion list.
See \featureref{docompress}.
+ \item[\code{nonfatal} for commands] If you call \code{nonfatal}
+ the command given as argument will not abort the build process in
+ case of a failure (as is the default) but will return non-zero on
+ failure.
+ See \featureref{nonfatal}.
\item[\code{dodoc} recursion] If the \code{-r} switch is given as
first argument and followed by directories, files from there are
installed recursively. See \featureref{dodoc}.
\item[\code{doins} symlink support] Symbolic links are now
properly installed when using recursion (\code{-r} switch).
See \featureref{doins}.
- \item[\code{nonfatal} for commands] If you call \code{nonfatal}
- the command given as argument will not abort the build process in
- case of a failure (as is the default) but will return non-zero on
- failure.
- See \featureref{nonfatal}.
\item[\code{PROPERTIES}] Is mandatory for all package managers now
to support interactive installs.
\item[\code{REQUIRED\_USE}] This variable can be used similar to
@@ -209,7 +217,7 @@ If there is no EAPI explicitly specified, EAPI 0 is assumed.
combinations that are not allowed. All elements can be further
nested to achieve more functionality.
\begin{description}
- \item[Forbidden combination] To prevent activation of
+ \item[Illegal combination] To prevent activation of
\code{flag1} if \code{flag2} is enabled use
"\code{flag2?\ ( !flag1 )}".
\item[OR] If at least one USE flag out of many must be
@@ -315,6 +323,77 @@ If there is no EAPI explicitly specified, EAPI 0 is assumed.
would be merged due to a stable keyword.
See \featureref{stablemask}.
\end{description}
+
+\section{EAPI 6 (2015-11-08)}
+\label{sec:cs:eapi6}
+\subsection{Additions/Changes}
+\label{sec:cs:eapi6-additions}
+\begin{description}
+ \item[Bash version] Ebuilds can use features of Bash version 4.2
+ (was 3.2 before).
+ See \featureref{bash-version}.
+ \item[\code{failglob}] The \code{failglob} option of Bash is set
+ in global scope, so that unintentional pattern expansion will be
+ caught as an error.
+ See \featureref{failglob}.
+ \item[\code{src\_prepare}] This phase function has a default now,
+ which applies patches from the \code{PATCHES} variable with the
+ new \code{eapply} command, and user-provided patches with
+ \code{eapply\_user}.
+ See \featureref{src-prepare-6}.
+ \item[\code{src\_install}] The default implementation uses the new
+ \code{einstalldocs} function for installing documentation.
+ See \featureref{src-install-6}.
+ \item[\code{unpack} changes] \code{unpack} has been extended:
+ \begin{description}
+ \item[Pathnames] Both absolute paths and paths relative to the
+ working directory are accepted as arguments.
+ See \featureref{unpack-absolute}.
+ \item[\code{.txz} files] Suffix \code{.txz} for xz compressed
+ tarballs is recognised.
+ See \featureref{unpack-extensions}.
+ \item[Filename case] Character case of filename extensions is
+ ignored.
+ See \featureref{unpack-ignore-case}.
+ \end{description}
+ \item[\code{econf} changes] Options \code{-{}-docdir} and
+ \code{-{}-htmldir} are passed to \code{configure}, in addition to
+ the existing options.
+ See \featureref{econf-options}.
+ \item[\code{nonfatal die}] When \code{die} or \code{assert} are
+ called under the \code{nonfatal} command and with the \code{-n}
+ option, they will not abort the build process but return with an
+ error.
+ See \featureref{nonfatal-die}.
+ \item[\code{eapply}] The \code{eapply} command is a simplified
+ substitute for \code{epatch}, implemented in the package manager.
+ The patches from its file or directory arguments are applied using
+ \code{patch -p1}.
+ See \featureref{eapply}.
+ \item[\code{eapply\_user}] The \code{eapply\_user} command permits
+ the package manager to apply user-provided patches. It must be
+ called from every \code{src\_prepare} function.
+ See \featureref{eapply-user}.
+ \item[\code{einstalldocs}] The \code{einstalldocs} function will
+ install the files specified by the \code{DOCS} variable (or a
+ default set of files if \code{DOCS} is unset) and by the
+ \code{HTML\_DOCS} variable.
+ See \featureref{einstalldocs}.
+ \item[\code{in\_iuse}] The \code{in\_iuse} function returns
+ true if the USE flag given as its argument is available in the
+ ebuild for USE queries.
+ See \featureref{in-iuse}.
+ \item[\code{get\_libdir}] The \code{get\_libdir} command outputs
+ the \code{lib*} directory basename suitable for the current ABI.
+ See \featureref{get-libdir}.
+\end{description}
+\subsection{Removals/Bans}
+\label{sec:cs:eapi6-removalsbans}
+\begin{description}
+ \item[\code{einstall}] No longer allowed. Use \code{emake install}
+ as replacement.
+ See \featureref{banned-commands}.
+\end{description}
\end{document}
% vim: set filetype=tex fileencoding=utf8 et tw=70 spell spelllang=en :
diff --git a/eapi-differences.tex b/eapi-differences.tex
index 9194f74..d4a90e0 100644
--- a/eapi-differences.tex
+++ b/eapi-differences.tex
@@ -1,37 +1,38 @@
\chapter{Feature Availability by EAPI}
\note This chapter is informative and for convenience only. Refer to the main text for specifics.
+For lack of space, EAPIs 0, 1, and~2 have been consolidated into a single column in the table
+below; entries marked with an asterisk differ between these EAPIs. See the 2012-09-20 edition
+of this document for a complete table of previous EAPIs.
-\ChangeWhenAddingAnEAPI{5}
+\ChangeWhenAddingAnEAPI{6}
\begin{landscape}
-\begin{longtable}{llP{5em}P{5em}P{6em}P{6em}P{6em}P{6em}}
+\begin{longtable}{llP{7.5em}P{7.5em}P{7.5em}P{7.5em}P{7.5em}}
\caption{Features in EAPIs}\\
\toprule
\multicolumn{1}{c}{\b{Feature}} &
\multicolumn{1}{c}{\b{Reference}} &
-\multicolumn{6}{c}{\b{EAPIs}} \\
+\multicolumn{5}{c}{\b{EAPIs}} \\
\multicolumn{1}{c}{} &
\multicolumn{1}{c}{} &
-\multicolumn{1}{c}{0} &
-\multicolumn{1}{c}{1} &
-\multicolumn{1}{c}{2} &
+\multicolumn{1}{c}{0, 1, 2} &
\multicolumn{1}{c}{3} &
\multicolumn{1}{c}{4} &
-\multicolumn{1}{c}{5} \\
+\multicolumn{1}{c}{5} &
+\multicolumn{1}{c}{6} \\
\midrule
\endfirsthead
\midrule
\multicolumn{1}{c}{\b{Feature}} &
\multicolumn{1}{c}{\b{Reference}} &
-\multicolumn{6}{c}{\b{EAPIs}} \\
+\multicolumn{5}{c}{\b{EAPIs}} \\
\multicolumn{1}{c}{} &
\multicolumn{1}{c}{} &
-\multicolumn{1}{c}{0} &
-\multicolumn{1}{c}{1} &
-\multicolumn{1}{c}{2} &
+\multicolumn{1}{c}{0, 1, 2} &
\multicolumn{1}{c}{3} &
\multicolumn{1}{c}{4} &
-\multicolumn{1}{c}{5} \\
+\multicolumn{1}{c}{5} &
+\multicolumn{1}{c}{6} \\
\midrule
\endhead
\midrule
@@ -40,160 +41,203 @@
\endlastfoot
Stable use masking/forcing & \compactfeatureref{stablemask} &
- No & No & No & No & No & Yes \\
+ No & No & No & Yes & Yes \\
+
+Bash version & \compactfeatureref{bash-version} &
+ 3.2 & 3.2 & 3.2 & 3.2 & 4.2 \\
\t{IUSE} defaults & \compactfeatureref{iuse-defaults} &
- No & Yes & Yes & Yes & Yes & Yes \\
+ * & Yes & Yes & Yes & Yes \\
\t{REQUIRED\_USE} & \compactfeatureref{required-use} &
- No & No & No & No & Yes & Yes \\
+ No & No & Yes & Yes & Yes \\
\t{PROPERTIES} & \compactfeatureref{properties} &
- Optionally & Optionally & Optionally & Optionally & Yes & Yes \\
+ Optionally & Optionally & Yes & Yes & Yes \\
\t{RDEPEND=DEPEND} & \compactfeatureref{rdepend-depend} &
- Yes & Yes & Yes & Yes & No & No \\
+ Yes & Yes & No & No & No \\
\t{DEFINED\_PHASES} & \compactfeatureref{defined-phases} &
- Optionally & Optionally & Optionally & Optionally & Yes & Yes \\
+ Optionally & Optionally & Yes & Yes & Yes \\
\t{??\ ( )} groups & \compactfeatureref{at-most-one-of} &
- No & No & No & No & No & Yes \\
+ No & No & No & Yes & Yes \\
\t{SRC\_URI} arrows & \compactfeatureref{src-uri-arrows} &
- No & No & Yes & Yes & Yes & Yes \\
+ * & Yes & Yes & Yes & Yes \\
Slot dependencies & \compactfeatureref{slot-deps} &
- No & Named & Named & Named & Named & Named and Operator \\
+ * & Named & Named & Named and Operator & Named and Operator \\
Sub-slots & \compactfeatureref{sub-slot} &
- No & No & No & No & No & Yes \\
+ No & No & No & Yes & Yes \\
Use dependencies & \compactfeatureref{use-deps} &
- No & No & 2-style & 2-style & 4-style & 4-style \\
+ * & 2-style & 4-style & 4-style & 4-style \\
\t{!}\ blockers & \compactfeatureref{bang-strength} &
- Unspecified & Unspecified & Weak & Weak & Weak & Weak \\
+ * & Weak & Weak & Weak & Weak \\
\t{!!}\ blockers & \compactfeatureref{bang-strength} &
- Forbidden & Forbidden & Strong & Strong & Strong & Strong \\
+ * & Strong & Strong & Strong & Strong \\
\t{S} to \t{WORKDIR} fallback & \compactfeatureref{s-workdir-fallback} &
- Always & Always & Always & Always & Conditional & Conditional \\
+ Always & Always & Conditional & Conditional & Conditional \\
\t{pkg\_pretend} & \compactfeatureref{pkg-pretend} &
- No & No & No & No & Yes & Yes \\
+ No & No & Yes & Yes & Yes \\
\t{src\_prepare} & \compactfeatureref{src-prepare} &
- No & No & Yes & Yes & Yes & Yes \\
+ * & Yes & Yes & Yes & Yes \\
+
+\t{src\_prepare} style & \compactfeatureref{src-prepare} &
+ * & no-op & no-op & no-op & 6 \\
\t{src\_configure} & \compactfeatureref{src-configure} &
- No & No & Yes & Yes & Yes & Yes \\
+ * & Yes & Yes & Yes & Yes \\
\t{src\_compile} style & \compactfeatureref{src-compile} &
- 0 & 1 & 2 & 2 & 2 & 2 \\
+ * & 2 & 2 & 2 & 2 \\
Parallel tests & \compactfeatureref{parallel-tests} &
- No & No & No & No & No & Yes \\
+ No & No & No & Yes & Yes \\
\t{src\_install} style & \compactfeatureref{src-install} &
- no-op & no-op & no-op & no-op & 4 & 4 \\
+ no-op & no-op & 4 & 4 & 6 \\
\t{pkg\_info} & \compactfeatureref{pkg-info} &
- Installed & Installed & Installed & Installed & Both & Both \\
+ Installed & Installed & Both & Both & Both \\
\t{default\_} phase functions & \compactfeatureref{default-phase-funcs} &
- None & None &
- \t{pkg\_nofetch}, \t{src\_unpack}, \t{src\_prepare}, \t{src\_configure}, \t{src\_compile}, \t{src\_test} &
- \t{pkg\_nofetch}, \t{src\_unpack}, \t{src\_prepare}, \t{src\_configure}, \t{src\_compile}, \t{src\_test} &
+ * &
+ \t{pkg\_nofetch}, \t{src\_unpack}, \t{src\_prepare}, \t{src\_configure},
+ \t{src\_compile}, \t{src\_test} &
+ \t{pkg\_nofetch}, \t{src\_unpack}, \t{src\_prepare}, \t{src\_configure},
+ \t{src\_compile}, \t{src\_install}, \t{src\_test} &
\t{pkg\_nofetch}, \t{src\_unpack}, \t{src\_prepare}, \t{src\_configure},
\t{src\_compile}, \t{src\_install}, \t{src\_test} &
\t{pkg\_nofetch}, \t{src\_unpack}, \t{src\_prepare}, \t{src\_configure},
\t{src\_compile}, \t{src\_install}, \t{src\_test} \\
\t{AA} & \compactfeatureref{aa} &
- Yes & Yes & Yes & Yes & No & No \\
+ Yes & Yes & No & No & No \\
\t{KV} & \compactfeatureref{kv} &
- Yes & Yes & Yes & Yes & No & No \\
+ Yes & Yes & No & No & No \\
\t{EBUILD\_PHASE\_FUNC} & \compactfeatureref{ebuild-phase-func} &
- No & No & No & No & No & Yes \\
+ No & No & No & Yes & Yes \\
\t{MERGE\_TYPE} & \compactfeatureref{merge-type} &
- No & No & No & No & Yes & Yes \\
+ No & No & Yes & Yes & Yes \\
Profile \t{IUSE} injection & \compactfeatureref{profile-iuse-inject} &
- No & No & No & No & No & Yes \\
+ No & No & No & Yes & Yes \\
\t{REPLACING\_VERSIONS} & \compactfeatureref{replace-version-vars} &
- No & No & No & No & Yes & Yes \\
+ No & No & Yes & Yes & Yes \\
\t{REPLACED\_BY\_VERSION} & \compactfeatureref{replace-version-vars} &
- No & No & No & No & Yes & Yes \\
+ No & No & Yes & Yes & Yes \\
\t{EPREFIX}, \t{ED}, \t{EROOT} & \compactfeatureref{offset-prefix-vars} &
- No & No & No & Yes & Yes & Yes \\
+ No & Yes & Yes & Yes & Yes \\
+
+\t{failglob} in global scope & \compactfeatureref{failglob} &
+ No & No & No & No & Yes \\
\t{find} is GNU? & \compactfeatureref{gnu-find} &
- Undefined & Undefined & Undefined & Undefined & Undefined & Yes \\
+ Undefined & Undefined & Undefined & Yes & Yes \\
Most utilities die & \compactfeatureref{die-on-failure} &
- No & No & No & No & Yes & Yes \\
+ No & No & Yes & Yes & Yes \\
\t{nonfatal} & \compactfeatureref{nonfatal} &
- No & No & No & No & Yes & Yes \\
+ No & No & Yes & Yes & Yes \\
\t{dohard} & \compactfeatureref{banned-commands} &
- Yes & Yes & Yes & Yes & Banned & Banned \\
+ Yes & Yes & Banned & Banned & Banned \\
\t{dosed} & \compactfeatureref{banned-commands} &
- Yes & Yes & Yes & Yes & Banned & Banned \\
+ Yes & Yes & Banned & Banned & Banned \\
+
+\t{einstall} & \compactfeatureref{banned-commands} &
+ Yes & Yes & Yes & Yes & Banned \\
Option \t{-{}-host-root} & \compactfeatureref{host-root-option} &
- No & No & No & No & No & Yes \\
+ No & No & No & Yes & Yes \\
+
+\t{die -n} & \compactfeatureref{nonfatal-die} &
+ No & No & No & No & Yes \\
+
+\t{eapply} & \compactfeatureref{eapply} &
+ No & No & No & No & Yes \\
+
+\t{eapply\_user} & \compactfeatureref{eapply-user} &
+ No & No & No & No & Yes \\
\t{econf} arguments & \compactfeatureref{econf-options} &
- & & & & disable dependency tracking & disable dependency tracking, disable silent rules \\
+ & & disable dependency tracking &
+ disable dependency tracking, disable silent rules &
+ disable dependency tracking, disable silent rules, docdir, htmldir \\
\t{dodoc -r} & \compactfeatureref{dodoc} &
- No & No & No & No & Yes & Yes \\
+ No & No & Yes & Yes & Yes \\
\t{doheader} & \compactfeatureref{doheader} &
- No & No & No & No & No & Yes \\
+ No & No & No & Yes & Yes \\
\t{doins} handles symlinks & \compactfeatureref{doins} &
- No & No & No & No & Yes & Yes \\
+ No & No & Yes & Yes & Yes \\
\t{doman} languages & \compactfeatureref{doman-langs} &
- No & No & Yes & Yes & Yes & Yes \\
+ * & Yes & Yes & Yes & Yes \\
\t{doman -i18n} precedence & \compactfeatureref{doman-langs} &
- N/A & N/A & No & No & Yes & Yes \\
+ * & No & Yes & Yes & Yes \\
\t{new*} support stdin & \compactfeatureref{newfoo-stdin} &
- No & No & No & No & No & Yes \\
+ No & No & No & Yes & Yes \\
Controllable compression & \compactfeatureref{docompress} &
- No & No & No & No & Yes & Yes \\
+ No & No & Yes & Yes & Yes \\
\t{docompress} & \compactfeatureref{docompress} &
- No & No & No & No & Yes & Yes \\
+ No & No & Yes & Yes & Yes \\
\t{use\_with} empty third arg & \compactfeatureref{use-with} &
- No & No & No & No & Yes & Yes \\
+ No & No & Yes & Yes & Yes \\
\t{usex} & \compactfeatureref{usex} &
- No & No & No & No & No & Yes \\
+ No & No & No & Yes & Yes \\
+
+\t{in\_iuse} & \compactfeatureref{in-iuse} &
+ No & No & No & No & Yes \\
-\t{unpack} support for \t{xz}? & \compactfeatureref{unpack-extensions} &
- No & No & No & Yes & Yes & Yes \\
+\t{unpack} absolute paths & \compactfeatureref{unpack-absolute} &
+ No & No & No & No & Yes \\
+
+\t{unpack} support for \t{xz} & \compactfeatureref{unpack-extensions} &
+ No & Yes & Yes & Yes & Yes \\
+
+\t{unpack} support for \t{txz} & \compactfeatureref{unpack-extensions} &
+ No & No & No & No & Yes \\
+
+\t{unpack} case-insensitive & \compactfeatureref{unpack-ignore-case} &
+ No & No & No & No & Yes \\
\t{default} function & \compactfeatureref{default-func} &
- No & No & Yes & Yes & Yes & Yes \\
+ * & Yes & Yes & Yes & Yes \\
+
+\t{einstalldocs} & \compactfeatureref{einstalldocs} &
+ No & No & No & No & Yes \\
+
+\t{get\_libdir} & \compactfeatureref{get-libdir} &
+ No & No & No & No & Yes \\
File mtimes preserved & \compactfeatureref{mtime-preserve} &
- Undefined & Undefined & Undefined & Yes & Yes & Yes \\
+ Undefined & Yes & Yes & Yes & Yes \\
\end{longtable}
\end{landscape}
@@ -293,7 +337,29 @@ EAPI 5 is EAPI 4 with the following changes:
\item \t{usex} support, \featureref{usex}.
\end{compactitem}
-\ChangeWhenAddingAnEAPI{5}
+\section*{EAPI 6}
+
+EAPI 6 is EAPI 5 with the following changes:
+
+\begin{compactitem}
+\item Bash version is 4.2, \featureref{bash-version}.
+\item Default \t{src\_prepare} no longer a no-op, \featureref{src-prepare-6}.
+\item Different \t{src\_install} implementation, \featureref{src-install-6}.
+\item \t{failglob} is enabled in global scope, \featureref{failglob}.
+\item \t{einstall} banned, \featureref{banned-commands}.
+\item \t{die} and \t{assert} called with \t{-n} respect \t{nonfatal}, \featureref{nonfatal-die}.
+\item \t{eapply} support, \featureref{eapply}.
+\item \t{eapply\_user} support, \featureref{eapply-user}.
+\item \t{econf} adds \t{-{}-docdir} and \t{-{}-htmldir}, \featureref{econf-options}.
+\item \t{in\_iuse} support, \featureref{in-iuse}.
+\item \t{unpack} supports absolute and relative paths, \featureref{unpack-absolute}.
+\item \t{unpack} supports \t{.txz}, \featureref{unpack-extensions}.
+\item \t{unpack} matches filename extensions case-insensitively, \featureref{unpack-ignore-case}.
+\item \t{einstalldocs} support, \featureref{einstalldocs}.
+\item \t{get\_libdir} support, \featureref{get-libdir}.
+\end{compactitem}
+
+\ChangeWhenAddingAnEAPI{6}
% vim: set filetype=tex fileencoding=utf8 et tw=100 spell spelllang=en :
diff --git a/eapis.tex b/eapis.tex
index 6b03d2b..7178e5a 100644
--- a/eapis.tex
+++ b/eapis.tex
@@ -19,19 +19,15 @@ EAPIs are also used for profile directories, as described in section~\ref{sec:pr
The following EAPIs are defined by this specification:
-\ChangeWhenAddingAnEAPI{5}
+\ChangeWhenAddingAnEAPI{6}
\begin{description}
\item[0] The `original' base EAPI.
-\item[1] EAPI `1' contains a number of extensions to EAPI `0'. Except where explicitly noted, it is
- in all other ways identical to EAPI `0'.
-\item[2] EAPI `2' contains a number of extensions to EAPI `1'. Except where explicitly noted, it is
- in all other ways identical to EAPI `1'.
-\item[3] EAPI `3' contains a number of extensions to EAPI `2'. Except where explicitly noted, it is
- in all other ways identical to EAPI `2'.
-\item[4] EAPI `4' contains a number of extensions to EAPI `3'. Except where explicitly noted, it is
- in all other ways identical to EAPI `3'.
-\item[5] EAPI `5' contains a number of extensions to EAPI `4'. Except where explicitly noted, it is
- in all other ways identical to EAPI `4'.
+\item[1] EAPI `1' contains a number of extensions to EAPI `0'.
+\item[2] EAPI `2' contains a number of extensions to EAPI `1'.
+\item[3] EAPI `3' contains a number of extensions to EAPI `2'.
+\item[4] EAPI `4' contains a number of extensions to EAPI `3'.
+\item[5] EAPI `5' contains a number of extensions to EAPI `4'.
+\item[6] EAPI `6' contains a number of extensions to EAPI `5'.
\end{description}
Except where explicitly noted, everything in this specification
diff --git a/ebuild-env-commands.tex b/ebuild-env-commands.tex
index 20771bd..72228da 100644
--- a/ebuild-env-commands.tex
+++ b/ebuild-env-commands.tex
@@ -23,10 +23,8 @@ dependencies must be used to ensure their presence.
The following commands must always be available in the ebuild environment:
\begin{compactitem}
-\item All builtin commands in GNU bash, version 3.2\footnote{The required bash version was
- retroactively updated from 3.0 to 3.2 in November 2009
- (see \url{https://projects.gentoo.org/council/meeting-logs/20091109.txt}).%
- \label{fn:bash3.2}}.
+\item All builtin commands in GNU bash, version as listed in table~\ref{tab:bash-version} on
+ page~\pageref{tab:bash-version}.
\item \t{sed} must be available, and must support all forms of invocations valid for GNU sed
version 4 or later.
\item \t{patch} must be available, and must support all inputs valid for GNU patch.
@@ -35,20 +33,25 @@ The following commands must always be available in the ebuild environment:
table~\ref{tab:system-commands-table} as requiring GNU find.
\end{compactitem}
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{\t{find} implementation for EAPIs} \label{tab:system-commands-table}
- \begin{tabular}{ l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{GNU \t{find}?}} \\
- \midrule
- \t{0} & Undefined \\
- \t{1} & Undefined \\
- \t{2} & Undefined \\
- \t{3} & Undefined \\
- \t{4} & Undefined \\
- \t{5} & Yes \\
- \bottomrule
+\subsubsection{Shell options}
+
+\featurelabel{failglob} For EAPIs listed such in table~\ref{tab:system-commands-table}, the
+\t{failglob} option of bash is set in the global scope of ebuilds. If set, failed pattern matches
+during filename expansion result in an error when the ebuild is being sourced.
+
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{System commands for EAPIs}
+ \label{tab:system-commands-table}
+ \begin{tabular}{lll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{GNU \t{find}?}} &
+ \multicolumn{1}{c}{\textbf{\t{failglob} in global scope?}} \\
+ \midrule
+ 0, 1, 2, 3, 4 & Undefined & No \\
+ 5 & Yes & No \\
+ 6 & Yes & Yes \\
+ \bottomrule
\end{tabular}
\end{centertable}
diff --git a/ebuild-env-vars.tex b/ebuild-env-vars.tex
index 4623d52..8a9be0e 100644
--- a/ebuild-env-vars.tex
+++ b/ebuild-env-vars.tex
@@ -231,61 +231,52 @@ variable.
\end{longtable}
\end{landscape}
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{EAPIs supporting various added env variables} \label{tab:added-env-vars-table}
- \begin{tabular}{ l l l l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{\t{MERGE\_TYPE}?}} &
- \multicolumn{1}{c}{\textbf{\t{REPLACING\_VERSIONS}?}} &
- \multicolumn{1}{c}{\textbf{\t{REPLACED\_BY\_VERSION}?}} &
- \multicolumn{1}{c}{\textbf{\t{EBUILD\_PHASE\_FUNC}?}} \\
- \midrule
- \t{0} & No & No & No & No \\
- \t{1} & No & No & No & No \\
- \t{2} & No & No & No & No \\
- \t{3} & No & No & No & No \\
- \t{4} & Yes & Yes & Yes & No \\
- \t{5} & Yes & Yes & Yes & Yes \\
- \bottomrule
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{EAPIs supporting various added env variables}
+ \label{tab:added-env-vars-table}
+ \begin{tabular}{lllll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{\t{MERGE\_TYPE}?}} &
+ \multicolumn{1}{c}{\textbf{\t{REPLACING\_VERSIONS}?}} &
+ \multicolumn{1}{c}{\textbf{\t{REPLACED\_BY\_VERSION}?}} &
+ \multicolumn{1}{c}{\textbf{\t{EBUILD\_PHASE\_FUNC}?}} \\
+ \midrule
+ 0, 1, 2, 3 & No & No & No & No \\
+ 4 & Yes & Yes & Yes & No \\
+ 5, 6 & Yes & Yes & Yes & Yes \\
+ \bottomrule
\end{tabular}
\end{centertable}
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{EAPIs supporting various removed env variables} \label{tab:removed-env-vars-table}
- \begin{tabular}{ l l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{\t{AA}?}} &
- \multicolumn{1}{c}{\textbf{\t{KV}?}} \\
- \midrule
- \t{0} & Yes & Yes \\
- \t{1} & Yes & Yes \\
- \t{2} & Yes & Yes \\
- \t{3} & Yes & Yes \\
- \t{4} & No & No \\
- \t{5} & No & No \\
- \bottomrule
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{EAPIs supporting various removed env variables}
+ \label{tab:removed-env-vars-table}
+ \begin{tabular}{lll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{\t{AA}?}} &
+ \multicolumn{1}{c}{\textbf{\t{KV}?}} \\
+ \midrule
+ 0, 1, 2, 3 & Yes & Yes \\
+ 4, 5, 6 & No & No \\
+ \bottomrule
\end{tabular}
\end{centertable}
-\ChangeWhenAddingAnEAPI{5}
+\ChangeWhenAddingAnEAPI{6}
\begin{centertable}{EAPIs supporting offset-prefix env variables}
\label{tab:offset-env-vars-table}
- \begin{tabular}{ l l l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{\t{EPREFIX}?}} &
- \multicolumn{1}{c}{\textbf{\t{EROOT}?}} &
- \multicolumn{1}{c}{\textbf{\t{ED}?}} \\
- \midrule
- \t{0} & No & No & No \\
- \t{1} & No & No & No \\
- \t{2} & No & No & No \\
- \t{3} & Yes & Yes & Yes \\
- \t{4} & Yes & Yes & Yes \\
- \t{5} & Yes & Yes & Yes \\
- \bottomrule
+ \begin{tabular}{llll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{\t{EPREFIX}?}} &
+ \multicolumn{1}{c}{\textbf{\t{EROOT}?}} &
+ \multicolumn{1}{c}{\textbf{\t{ED}?}} \\
+ \midrule
+ 0, 1, 2 & No & No & No \\
+ 3, 4, 5, 6 & Yes & Yes & Yes \\
+ \bottomrule
\end{tabular}
\end{centertable}
@@ -385,21 +376,17 @@ contain at most one value.
\subsection{Offset-prefix variables \t{EPREFIX}, \t{EROOT} and \t{ED}}
\label{sec:offset-vars}
-\ChangeWhenAddingAnEAPI{5}
+\ChangeWhenAddingAnEAPI{6}
\begin{centertable}{EAPIs supporting offset-prefix}
\label{tab:offset-support-table}
- \begin{tabular}{ l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{Supports offset-prefix?}}\\
- \midrule
- \t{0} & No \\
- \t{1} & No \\
- \t{2} & No \\
- \t{3} & Yes \\
- \t{4} & Yes \\
- \t{5} & Yes \\
- \bottomrule
+ \begin{tabular}{ll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{Supports offset-prefix?}}\\
+ \midrule
+ 0, 1, 2 & No \\
+ 3, 4, 5, 6 & Yes \\
+ \bottomrule
\end{tabular}
\end{centertable}
diff --git a/ebuild-format.tex b/ebuild-format.tex
index b623b97..db6d7a1 100644
--- a/ebuild-format.tex
+++ b/ebuild-format.tex
@@ -1,12 +1,30 @@
\chapter{Ebuild File Format}
\label{sec:ebuild-format}
-The ebuild file format is in its basic form a subset of the format of a bash script. The interpreter
-is assumed to be GNU bash, version 3.2 or later, see footnote~\ref{fn:bash3.2} on
-page~\pageref{fn:bash3.2}. The file encoding must be UTF-8 with Unix-style newlines. When sourced,
-the ebuild must define certain variables and functions (see sections~\ref{sec:ebuild-vars}
-and~\ref{sec:ebuild-functions} for specific information), and must not call any external programs,
-write anything to standard output or standard error, or modify the state of the system in any way.
+\featurelabel{bash-version} The ebuild file format is in its basic form a subset of the format of
+a bash script. The interpreter is assumed to be GNU bash, version as listed in
+table~\ref{tab:bash-version}, or any later version. If possible, the package manager should set
+the shell's compatibility level to the exact version specified. It must ensure that any such
+compatibility settings (e.g. the \t{BASH\_COMPAT} variable) are not exported to external programs.
+
+The file encoding must be UTF-8 with Unix-style newlines. When sourced, the ebuild must define
+certain variables and functions (see sections~\ref{sec:ebuild-vars} and~\ref{sec:ebuild-functions}
+for specific information), and must not call any external programs, write anything to standard
+output or standard error, or modify the state of the system in any way.
+
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{Bash version}
+ \label{tab:bash-version}
+ \begin{tabular}{ll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{Bash version}} \\
+ \midrule
+ 0, 1, 2, 3, 4, 5 & 3.2 \\
+ 6 & 4.2 \\
+ \bottomrule
+ \end{tabular}
+\end{centertable}
% vim: set filetype=tex fileencoding=utf8 et tw=100 spell spelllang=en :
diff --git a/ebuild-functions.tex b/ebuild-functions.tex
index 084e866..6983ddb 100644
--- a/ebuild-functions.tex
+++ b/ebuild-functions.tex
@@ -44,20 +44,17 @@ fallback to \t{WORKDIR} is used:
in \t{DEFINED\_PHASES}.
\end{compactitem}
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{EAPIs with \t{S} to \t{WORKDIR} fallbacks} \label{tab:s-fallback-table}
- \begin{tabular}{ l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{Fallback to \t{WORKDIR} permitted?}} \\
- \midrule
- \t{0} & Always \\
- \t{1} & Always \\
- \t{2} & Always \\
- \t{3} & Always \\
- \t{4} & Conditional error \\
- \t{5} & Conditional error \\
- \bottomrule
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{EAPIs with \t{S} to \t{WORKDIR} fallbacks}
+ \label{tab:s-fallback-table}
+ \begin{tabular}{ll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{Fallback to \t{WORKDIR} permitted?}} \\
+ \midrule
+ 0, 1, 2, 3 & Always \\
+ 4, 5, 6 & Conditional error \\
+ \bottomrule
\end{tabular}
\end{centertable}
@@ -79,20 +76,17 @@ before the next phase is executed.
\t{pkg\_pretend} must not write to the filesystem.
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{EAPIs supporting \t{pkg\_pretend}} \label{tab:pkg-pretend-table}
- \begin{tabular}{ l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{Supports \t{pkg\_pretend}?}} \\
- \midrule
- \t{0} & No \\
- \t{1} & No \\
- \t{2} & No \\
- \t{3} & No \\
- \t{4} & Yes \\
- \t{5} & Yes \\
- \bottomrule
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{EAPIs supporting \t{pkg\_pretend}}
+ \label{tab:pkg-pretend-table}
+ \begin{tabular}{ll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{Supports \t{pkg\_pretend}?}} \\
+ \midrule
+ 0, 1, 2, 3 & No \\
+ 4, 5, 6 & Yes \\
+ \bottomrule
\end{tabular}
\end{centertable}
@@ -130,28 +124,46 @@ src_unpack() {
\label{sec:src-prepare-function}
\featurelabel{src-prepare} The \t{src\_prepare} function is only called for EAPIs listed in
-table~\ref{tab:src-prepare-table} as supporting it.
-
-The \t{src\_prepare} function can be used for post-unpack source preparation. The default
-implementation does nothing.
+table~\ref{tab:src-prepare-table} as supporting it. The \t{src\_prepare} function can be used for
+post-unpack source preparation.
The initial working directory is \t{S}, with an error or fallback to \t{WORKDIR} as discussed in
section~\ref{sec:s-to-workdir-fallback}.
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{EAPIs supporting \t{src\_prepare}} \label{tab:src-prepare-table}
- \begin{tabular}{ l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{Supports \t{src\_prepare}?}} \\
- \midrule
- \t{0} & No \\
- \t{1} & No \\
- \t{2} & Yes \\
- \t{3} & Yes \\
- \t{4} & Yes \\
- \t{5} & Yes \\
- \bottomrule
+\featurelabel{src-prepare-6} For EAPIs listed in table~\ref{tab:src-prepare-table} as using format
+6, the default implementation used when the ebuild lacks the \t{src\_prepare} function shall behave
+as:
+
+\begin{listing}[H]
+\caption{src\_prepare, format~6} \label{lst:src-prepare-6}
+\begin{verbatim}
+src_prepare() {
+ if declare -p PATCHES | grep -q "^declare -a "; then
+ [[ -n ${PATCHES[@]} ]] && eapply "${PATCHES[@]}"
+ else
+ [[ -n ${PATCHES} ]] && eapply ${PATCHES}
+ fi
+ eapply_user
+}
+\end{verbatim}
+\end{listing}
+
+For other EAPIs supporting \t{src\_prepare}, the default implementation used when the ebuild lacks
+the \t{src\_prepare} function is a no-op.
+
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{\t{src\_prepare} support and behaviour for EAPIs}
+ \label{tab:src-prepare-table}
+ \begin{tabular}{lll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{Supports \t{src\_prepare}?}} &
+ \multicolumn{1}{c}{\textbf{Format}} \\
+ \midrule
+ 0, 1 & No & Not applicable \\
+ 2, 3, 4, 5 & Yes & no-op \\
+ 6 & Yes & 6 \\
+ \bottomrule
\end{tabular}
\end{centertable}
@@ -178,20 +190,17 @@ src_configure() {
\end{verbatim}
\end{listing}
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{EAPIs supporting \t{src\_configure}} \label{tab:src-configure-table}
- \begin{tabular}{ l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{Supports \t{src\_configure}?}} \\
- \midrule
- \t{0} & No \\
- \t{1} & No \\
- \t{2} & Yes \\
- \t{3} & Yes \\
- \t{4} & Yes \\
- \t{5} & Yes \\
- \bottomrule
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{EAPIs supporting \t{src\_configure}}
+ \label{tab:src-configure-table}
+ \begin{tabular}{ll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{Supports \t{src\_configure}?}} \\
+ \midrule
+ 0, 1 & No \\
+ 2, 3, 4, 5, 6 & Yes \\
+ \bottomrule
\end{tabular}
\end{centertable}
@@ -255,20 +264,18 @@ src_compile() {
\end{verbatim}
\end{listing}
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{\t{src\_compile} behaviour for EAPIs} \label{tab:src-compile-table}
- \begin{tabular}{ l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{Format}} \\
- \midrule
- \t{0} & 0 \\
- \t{1} & 1 \\
- \t{2} & 2 \\
- \t{3} & 2 \\
- \t{4} & 2 \\
- \t{5} & 2 \\
- \bottomrule
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{\t{src\_compile} behaviour for EAPIs}
+ \label{tab:src-compile-table}
+ \begin{tabular}{ll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{Format}} \\
+ \midrule
+ 0 & 0 \\
+ 1 & 1 \\
+ 2, 3, 4, 5, 6 & 2 \\
+ \bottomrule
\end{tabular}
\end{centertable}
@@ -290,20 +297,17 @@ parallel tests, the \t{emake} command must be called with option \t{-j1}.
The \t{src\_test} function may be disabled by \t{RESTRICT}\@. See section~\ref{sec:restrict}. It may
be disabled by user too, using a PM-specific mechanism.
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{\t{src\_test} behaviour for EAPIs} \label{tab:src-test-table}
- \begin{tabular}{ l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{Supports parallel tests?}} \\
- \midrule
- \t{0} & No \\
- \t{1} & No \\
- \t{2} & No \\
- \t{3} & No \\
- \t{4} & No \\
- \t{5} & Yes \\
- \bottomrule
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{\t{src\_test} behaviour for EAPIs}
+ \label{tab:src-test-table}
+ \begin{tabular}{ll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{Supports parallel tests?}} \\
+ \midrule
+ 0, 1, 2, 3, 4 & No \\
+ 5, 6 & Yes \\
+ \bottomrule
\end{tabular}
\end{centertable}
@@ -343,23 +347,37 @@ src_install() {
\end{verbatim}
\end{listing}
+\featurelabel{src-install-6} For EAPIs listed in table~\ref{tab:src-install-table} as using format
+6, the default implementation used when the ebuild lacks the \t{src\_install} function shall behave
+as:
+
+\begin{listing}[H]
+\caption{src\_install, format~6} \label{lst:src-install-6}
+\begin{verbatim}
+src_install() {
+ if [[ -f Makefile ]] || [[ -f GNUmakefile ]] || [[ -f makefile ]]; then
+ emake DESTDIR="${D}" install
+ fi
+ einstalldocs
+}
+\end{verbatim}
+\end{listing}
+
For other EAPIs, the default implementation used when the ebuild lacks the \t{src\_install} function
is a no-op.
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{\t{src\_install} behaviour for EAPIs} \label{tab:src-install-table}
- \begin{tabular}{ l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{Format}} \\
- \midrule
- \t{0} & no-op \\
- \t{1} & no-op \\
- \t{2} & no-op \\
- \t{3} & no-op \\
- \t{4} & 4 \\
- \t{5} & 4 \\
- \bottomrule
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{\t{src\_install} behaviour for EAPIs}
+ \label{tab:src-install-table}
+ \begin{tabular}{ll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{Format}} \\
+ \midrule
+ 0, 1, 2, 3 & no-op \\
+ 4, 5 & 4 \\
+ 6 & 6 \\
+ \bottomrule
\end{tabular}
\end{centertable}
@@ -422,20 +440,17 @@ that dependencies may not be installed.
\t{pkg\_info} must not write to the filesystem.
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{EAPIs supporting \t{pkg\_info} on non-installed packages} \label{tab:pkg-info-table}
- \begin{tabular}{ l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{Supports \t{pkg\_info} on non-installed packages?}} \\
- \midrule
- \t{0} & No \\
- \t{1} & No \\
- \t{2} & No \\
- \t{3} & No \\
- \t{4} & Yes \\
- \t{5} & Yes \\
- \bottomrule
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{EAPIs supporting \t{pkg\_info} on non-installed packages}
+ \label{tab:pkg-info-table}
+ \begin{tabular}{ll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{Supports \t{pkg\_info} on non-installed packages?}} \\
+ \midrule
+ 0, 1, 2, 3 & No \\
+ 4, 5, 6 & Yes \\
+ \bottomrule
\end{tabular}
\end{centertable}
@@ -457,24 +472,20 @@ named \t{default\_}(phase) that behaves as the default implementation for that E
when executing any ebuild phase listed in the table. Ebuilds must not call these functions except
when in the phase in question.
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{EAPIs supporting \t{default\_} phase functions} \label{tab:default-phase-function-table}
- \begin{tabular}{ l >{\setlength{\rightskip}{0pt plus 1fil}}p{30em} }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{Supports \t{default\_} functions in phases}} \\
- \midrule
- \t{0} & None \\
- \t{1} & None \\
- \t{2} & \t{pkg\_nofetch}, \t{src\_unpack}, \t{src\_prepare}, \t{src\_configure},
- \t{src\_compile}, \t{src\_test} \\
- \t{3} & \t{pkg\_nofetch}, \t{src\_unpack}, \t{src\_prepare}, \t{src\_configure},
- \t{src\_compile}, \t{src\_test} \\
- \t{4} & \t{pkg\_nofetch}, \t{src\_unpack}, \t{src\_prepare}, \t{src\_configure},
- \t{src\_compile}, \t{src\_install}, \t{src\_test} \\
- \t{5} & \t{pkg\_nofetch}, \t{src\_unpack}, \t{src\_prepare}, \t{src\_configure},
- \t{src\_compile}, \t{src\_install}, \t{src\_test} \\
- \bottomrule
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{EAPIs supporting \t{default\_} phase functions}
+ \label{tab:default-phase-function-table}
+ \begin{tabular}{l P{26em}}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{Supports \t{default\_} functions in phases}} \\
+ \midrule
+ 0, 1 & None \\
+ 2, 3 & \t{pkg\_nofetch}, \t{src\_unpack}, \t{src\_prepare}, \t{src\_configure},
+ \t{src\_compile}, \t{src\_test} \\
+ 4, 5, 6 & \t{pkg\_nofetch}, \t{src\_unpack}, \t{src\_prepare}, \t{src\_configure},
+ \t{src\_compile}, \t{src\_install}, \t{src\_test} \\
+ \bottomrule
\end{tabular}
\end{centertable}
diff --git a/ebuild-vars.tex b/ebuild-vars.tex
index 9842557..43ce528 100644
--- a/ebuild-vars.tex
+++ b/ebuild-vars.tex
@@ -84,39 +84,32 @@ Ebuilds may define any of the following variables:
\item[PDEPEND] See section~\ref{sec:dependencies}.
\end{description}
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{EAPIs supporting \t{IUSE} defaults} \label{tab:iuse-defaults-table}
- \begin{tabular}{ l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{Supports \t{IUSE} defaults?}} \\
- \midrule
- \t{0} & No \\
- \t{1} & Yes \\
- \t{2} & Yes \\
- \t{3} & Yes \\
- \t{4} & Yes \\
- \t{5} & Yes \\
- \bottomrule
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{EAPIs supporting \t{IUSE} defaults}
+ \label{tab:iuse-defaults-table}
+ \begin{tabular}{ll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{Supports \t{IUSE} defaults?}} \\
+ \midrule
+ 0 & No \\
+ 1, 2, 3, 4, 5, 6 & Yes \\
+ \bottomrule
\end{tabular}
\end{centertable}
-\ChangeWhenAddingAnEAPI{5}
+\ChangeWhenAddingAnEAPI{6}
\begin{centertable}{EAPIs supporting various ebuild-defined variables}
-\label{tab:optional-vars-table}
- \begin{tabular}{ l l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{Supports \t{PROPERTIES}?}} &
- \multicolumn{1}{c}{\textbf{Supports \t{REQUIRED\_USE}?}} \\
- \midrule
- \t{0} & Optionally & No \\
- \t{1} & Optionally & No \\
- \t{2} & Optionally & No \\
- \t{3} & Optionally & No \\
- \t{4} & Yes & Yes \\
- \t{5} & Yes & Yes \\
- \bottomrule
+ \label{tab:optional-vars-table}
+ \begin{tabular}{lll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{Supports \t{PROPERTIES}?}} &
+ \multicolumn{1}{c}{\textbf{Supports \t{REQUIRED\_USE}?}} \\
+ \midrule
+ 0, 1, 2, 3 & Optionally & No \\
+ 4, 5, 6 & Yes & Yes \\
+ \bottomrule
\end{tabular}
\end{centertable}
@@ -183,20 +176,17 @@ any \t{DEPEND} or \t{RDEPEND} set in an eclass does not change the implicit \t{R
the ebuild portion, and any \t{DEPEND} value set in an eclass does not get treated as being part of
\t{RDEPEND}.
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{EAPIs with \t{RDEPEND=DEPEND} Default} \label{tab:rdepend-depend-table}
- \begin{tabular}{ l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{\t{RDEPEND=DEPEND}?}} \\
- \midrule
- \t{0} & Yes \\
- \t{1} & Yes \\
- \t{2} & Yes \\
- \t{3} & Yes \\
- \t{4} & No \\
- \t{5} & No \\
- \bottomrule
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{EAPIs with \t{RDEPEND=DEPEND} Default}
+ \label{tab:rdepend-depend-table}
+ \begin{tabular}{ll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{\t{RDEPEND=DEPEND}?}} \\
+ \midrule
+ 0, 1, 2, 3 & Yes \\
+ 4, 5, 6 & No \\
+ \bottomrule
\end{tabular}
\end{centertable}
@@ -229,20 +219,17 @@ this variable defined, and must treat an empty string as ``this information is n
\note Thus, by extension of section~\ref{sec:metadata-invariance}, phase functions must not be defined
based upon any variant condition.
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{EAPIs supporting \t{DEFINED\_PHASES}} \label{tab:defined-phases-table}
- \begin{tabular}{ l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{Supports \t{DEFINED\_PHASES}?}} \\
- \midrule
- \t{0} & Optionally \\
- \t{1} & Optionally \\
- \t{2} & Optionally \\
- \t{3} & Optionally \\
- \t{4} & Yes \\
- \t{5} & Yes \\
- \bottomrule
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{EAPIs supporting \t{DEFINED\_PHASES}}
+ \label{tab:defined-phases-table}
+ \begin{tabular}{ll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{Supports \t{DEFINED\_PHASES}?}} \\
+ \midrule
+ 0, 1, 2, 3 & Optionally \\
+ 4, 5, 6 & Yes \\
+ \bottomrule
\end{tabular}
\end{centertable}
diff --git a/merge.tex b/merge.tex
index c212294..9da9631 100644
--- a/merge.tex
+++ b/merge.tex
@@ -86,21 +86,17 @@ held under the original image directory.
In other EAPIs, the behaviour with respect to file modification times
is undefined.
-\ChangeWhenAddingAnEAPI{5}
+\ChangeWhenAddingAnEAPI{6}
\begin{centertable}{Preservation of file modification times (mtimes)}
\label{tab:mtime-preserve}
- \begin{tabular}{ l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{mtimes preserved?}} \\
- \midrule
- \t{0} & Undefined \\
- \t{1} & Undefined \\
- \t{2} & Undefined \\
- \t{3} & Yes \\
- \t{4} & Yes \\
- \t{5} & Yes \\
- \bottomrule
+ \begin{tabular}{ll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{mtimes preserved?}} \\
+ \midrule
+ 0, 1, 2 & Undefined \\
+ 3, 4, 5, 6 & Yes \\
+ \bottomrule
\end{tabular}
\end{centertable}
diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex
index d7347fe..aace888 100644
--- a/pkg-mgr-commands.tex
+++ b/pkg-mgr-commands.tex
@@ -18,26 +18,25 @@ The following commands affect this behaviour:
\begin{description}
\item[nonfatal] \featurelabel{nonfatal} Executes the remainder of its arguments as a command,
preserving the exit status. If this results in a command being called that would normally abort
- the build process due to a failure (but not due to an explicit \t{die} or \t{assert} call),
- instead a non-zero exit status shall be returned. Only in EAPIs listed in
- table~\ref{tab:commands-die-table} as supporting \t{nonfatal}.
+ the build process due to a failure, instead a non-zero exit status shall be returned. Only in
+ EAPIs listed in table~\ref{tab:commands-die-table} as supporting \t{nonfatal}.
+
+ Explicit \t{die} or \t{assert} commands only respect \t{nonfatal} when called with the \t{-n}
+ option and in EAPIs supporting this option, see table~\ref{tab:nonfatal-die}.
\end{description}
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{EAPI Command Failure Behaviour} \label{tab:commands-die-table}
- \begin{tabular}{ l l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{Command failure behaviour}} &
- \multicolumn{1}{c}{\textbf{Supports \t{nonfatal}?}} \\
- \midrule
- \t{0} & Non-zero exit & No \\
- \t{1} & Non-zero exit & No \\
- \t{2} & Non-zero exit & No \\
- \t{3} & Non-zero exit & No \\
- \t{4} & Aborts & Yes \\
- \t{5} & Aborts & Yes \\
- \bottomrule
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{EAPI Command Failure Behaviour}
+ \label{tab:commands-die-table}
+ \begin{tabular}{lll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{Command failure behaviour}} &
+ \multicolumn{1}{c}{\textbf{Supports \t{nonfatal}?}} \\
+ \midrule
+ 0, 1, 2, 3 & Non-zero exit & No \\
+ 4, 5, 6 & Aborts & Yes \\
+ \bottomrule
\end{tabular}
\end{centertable}
@@ -47,23 +46,22 @@ The following commands affect this behaviour:
\featurelabel{banned-commands} Some commands are banned in some EAPIs. If a banned command is
called, the package manager must abort the build process indicating an error.
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{Banned commands} \label{tab:banned-commands-table}
- \begin{tabular}{ l l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{2}{c}{\textbf{Command banned?}} \\
- \multicolumn{1}{c}{} &
- \multicolumn{1}{c}{\textbf{\t{dohard}}} &
- \multicolumn{1}{c}{\textbf{\t{dosed}}} \\
- \midrule
- \t{0} & No & No \\
- \t{1} & No & No \\
- \t{2} & No & No \\
- \t{3} & No & No \\
- \t{4} & Yes & Yes \\
- \t{5} & Yes & Yes \\
- \bottomrule
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{Banned commands}
+ \label{tab:banned-commands-table}
+ \begin{tabular}{llll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{3}{c}{\textbf{Command banned?}} \\
+ \multicolumn{1}{c}{} &
+ \multicolumn{1}{c}{\textbf{\t{dohard}}} &
+ \multicolumn{1}{c}{\textbf{\t{dosed}}} &
+ \multicolumn{1}{c}{\textbf{\t{einstall}}} \\
+ \midrule
+ 0, 1, 2, 3 & No & No & No \\
+ 4, 5 & Yes & Yes & No \\
+ 6 & Yes & Yes & Yes \\
+ \bottomrule
\end{tabular}
\end{centertable}
@@ -121,13 +119,104 @@ stderr or some other appropriate facility.
These commands are used when an error is detected that will prevent the build process from
completing. Ebuilds must not run any of these commands once the current phase function has returned.
\begin{description}
-\item[die] Displays a failure message provided in its first and only argument, and then aborts the
- build process. \t{die} is \e{not} guaranteed to work correctly if called from a subshell
- environment.
+\item[die] \featurelabel{nonfatal-die} If called under the \t{nonfatal} command (as per
+ section~\ref{sec:failure-behaviour}) and with \t{-n} as its first parameter, displays a failure
+ message provided in its following argument and then returns a non-zero exit status. Only in
+ EAPIs listed in table~\ref{tab:nonfatal-die} as supporting option~\t{-n}. Otherwise, displays
+ a failure message provided in its first and only argument, and then aborts the build process.
+ \t{die} is \e{not} guaranteed to work correctly if called from a subshell environment.
\item[assert] Checks the value of the shell's pipe status variable, and if any component is non-zero
- (indicating failure), calls \t{die} with its first argument as a failure message.
+ (indicating failure), calls \t{die}, passing any parameters to it.
\end{description}
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{EAPIs supporting \t{-n} for \t{die} and \t{assert} commands}
+ \label{tab:nonfatal-die}
+ \begin{tabular}{ll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{\t{die} and \t{assert} support \t{-n}?}} \\
+ \midrule
+ 0, 1, 2, 3, 4, 5 & No \\
+ 6 & Yes \\
+ \bottomrule
+ \end{tabular}
+\end{centertable}
+
+\subsubsection{Patch commands}
+These commands are used during the \t{src\_prepare} phase to apply patches to the package's sources.
+Ebuilds must not run any of these commands once the current phase function has returned.
+
+\begin{description}
+\item[eapply] \featurelabel{eapply} Takes zero or more GNU patch options, followed by one or more
+ file or directory paths. Processes options and applies all patches found in specified locations
+ according to Algorithm~\ref{alg:eapply}. If applying the patches fails, it aborts the build
+ using \t{die}, unless run using \t{nonfatal}, in which case it returns non-zero exit status.
+ Only available in EAPIs listed in table~\ref{tab:patch-commands} as supporting \t{eapply}.
+
+\item[eapply\_user] \featurelabel{eapply-user} Takes no arguments. Package managers supporting it
+ apply user-provided patches to the source tree in the current working directory. Exact behaviour
+ is implementation defined and beyond the scope of this specification. Package managers not
+ supporting it must implement the command as a no-op. Returns shell true (0) if patches applied
+ successfully, or if no patches were provided. Otherwise, aborts the build process, unless run
+ using \t{nonfatal}, in which case it returns non-zero exit status. Only available in EAPIs
+ listed in table~\ref{tab:patch-commands} as supporting \t{eapply\_user}. In EAPIs where it is
+ supported, \t{eapply\_user} must be called once in the \t{src\_prepare} phase. For any
+ subsequent calls, the command will do nothing and return~0.
+\end{description}
+
+\begin{algorithm}
+\caption{eapply logic} \label{alg:eapply}
+\begin{algorithmic}[1]
+\IF{any parameter is equal to \t{"-{}-"}}
+ \STATE collect all parameters before the first \t{"-{}-"} in the \t{options} array
+ \STATE collect all parameters after the first \t{"-{}-"} in the \t{files} array
+\ELSIF{any parameter that begins with a hyphen follows one that does not}
+ \STATE abort the build process with an error
+\ELSE
+ \STATE collect all parameters beginning with a hyphen in the \t{options} array
+ \STATE collect all remaining parameters in the \t{files} array
+\ENDIF
+\IF{the \t{files} array is empty}
+ \STATE abort the build process with an error
+\ENDIF
+\FORALL{\t{x} in the \t{files} array}
+ \IF{\t{\$x} is a directory}
+ \IF{\NOT any files match \t{\$x/*.diff} or \t{\$x/*.patch}}
+ \STATE abort the build process with an error
+ \ENDIF
+ \FORALL{files \t{f} matching \t{\$x/*.diff} or \t{\$x/*.patch}, sorted in POSIX locale}
+ \STATE call \t{patch -p1 -f -g0 -{}-no-backup-if-mismatch "\$\{options[@]\}" < "\$f"}
+ \IF{child process returned with non-zero exit status}
+ \RETURN immediately with that status
+ \ENDIF
+ \ENDFOR
+ \ELSE
+ \STATE call \t{patch -p1 -f -g0 -{}-no-backup-if-mismatch "\$\{options[@]\}" < "\$x"}
+ \IF{child process returned with non-zero exit status}
+ \RETURN immediately with that status
+ \ENDIF
+ \ENDIF
+\ENDFOR
+\RETURN shell true (0)
+\end{algorithmic}
+\end{algorithm}
+
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{Patch commands for EAPIs}
+ \label{tab:patch-commands}
+ \begin{tabular}{lll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{\t{eapply}?}} &
+ \multicolumn{1}{c}{\textbf{\t{eapply\_user}?}} \\
+ \midrule
+ 0, 1, 2, 3, 4, 5 & No & No \\
+ 6 & Yes & Yes \\
+ \bottomrule
+ \end{tabular}
+\end{centertable}
+
\subsubsection{Build commands}
These commands are used during the \t{src\_configure}, \t{src\_compile}, and \t{src\_install}
phases to run the package's build commands. Ebuilds must not run any of these commands once the
@@ -149,6 +238,12 @@ current phase function has returned.
\item -{}-datadir must be \t{\$\{EPREFIX\}/usr/share}
\item -{}-sysconfdir must be \t{\$\{EPREFIX\}/etc}
\item -{}-localstatedir must be \t{\$\{EPREFIX\}/var/lib}
+ \item -{}-docdir must be \t{\$\{EPREFIX\}/usr/share/doc/\$\{PF\}}, if the EAPI is listed in
+ table~\ref{tab:econf-options-table} as using it. This option will only be passed if the
+ string \t{-{}-docdir} occurs in the output of \t{configure -{}-help}.
+ \item -{}-htmldir must be \t{\$\{EPREFIX\}/usr/share/doc/\$\{PF\}/html}, if the EAPI is listed
+ in table~\ref{tab:econf-options-table} as using it. This option will only be passed if the
+ string \t{-{}-htmldir} occurs in the output of \t{configure -{}-help}.
\item -{}-host must be the value of the \t{CHOST} environment variable.
\item -{}-libdir must be set according to Algorithm~\ref{alg:econf-libdir}.
\item -{}-disable-dependency-tracking, if the EAPI is listed in
@@ -159,21 +254,22 @@ current phase function has returned.
in the output of \t{configure -{}-help}.
\end{itemize}
- \ChangeWhenAddingAnEAPI{5}
- \begin{centertable}{Extra \t{econf} arguments for EAPIs} \label{tab:econf-options-table}
- \begin{tabular}{ l l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{-{}-disable-dependency-tracking}?} &
- \multicolumn{1}{c}{\textbf{-{}-disable-silent-rules}?} \\
- \midrule
- \t{0} & No & No \\
- \t{1} & No & No \\
- \t{2} & No & No \\
- \t{3} & No & No \\
- \t{4} & Yes & No \\
- \t{5} & Yes & Yes \\
- \bottomrule
+ \ChangeWhenAddingAnEAPI{6}
+ \begin{centertable}{Extra \t{econf} arguments for EAPIs}
+ \label{tab:econf-options-table}
+ \begin{tabular}{lllll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{-{}-disable-dependency-tracking}} &
+ \multicolumn{1}{c}{\textbf{-{}-disable-silent-rules}} &
+ \multicolumn{1}{c}{\textbf{-{}-docdir}} &
+ \multicolumn{1}{c}{\textbf{-{}-htmldir}} \\
+ \midrule
+ 0, 1, 2, 3 & No & No & No & No \\
+ 4 & Yes & No & No & No \\
+ 5 & Yes & Yes & No & No \\
+ 6 & Yes & Yes & Yes & Yes \\
+ \bottomrule
\end{tabular}
\end{centertable}
@@ -216,6 +312,8 @@ current phase function has returned.
\item[einstall] A shortcut for the command given in Listing~\ref{lst:einstall}. Any arguments given
to \t{einstall} are passed verbatim to \t{emake}, as shown. Failure behaviour is EAPI dependent
as per section~\ref{sec:failure-behaviour}.
+ In EAPIs listed in table~\ref{tab:banned-commands-table}, this command is banned as per
+ section~\ref{sec:banned-commands}.
The variable \t{ED} is defined as in Table~\ref{tab:defined_vars} and depends on the use of an
offset-prefix. When such offset-prefix is absent, \t{ED} is equivalent to \t{D}\@. \t{ED} is
@@ -437,108 +535,89 @@ can be extended or reduced (see below). The options that can be passed to \t{doh
\end{description}
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{EAPIs supporting \t{dodoc -r}} \label{tab:dodoc-table}
- \begin{tabular}{ l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{Supports \t{dodoc -r}?}} \\
- \midrule
- \t{0} & No \\
- \t{1} & No \\
- \t{2} & No \\
- \t{3} & No \\
- \t{4} & Yes \\
- \t{5} & Yes \\
- \bottomrule
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{EAPIs supporting \t{dodoc -r}}
+ \label{tab:dodoc-table}
+ \begin{tabular}{ll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{Supports \t{dodoc -r}?}} \\
+ \midrule
+ 0, 1, 2, 3 & No \\
+ 4, 5, 6 & Yes \\
+ \bottomrule
\end{tabular}
\end{centertable}
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{EAPIs supporting \t{doheader} and \t{newheader}} \label{tab:doheader-table}
- \begin{tabular}{ l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{Supports \t{doheader} and \t{newheader}?}} \\
- \midrule
- \t{0} & No \\
- \t{1} & No \\
- \t{2} & No \\
- \t{3} & No \\
- \t{4} & No \\
- \t{5} & Yes \\
- \bottomrule
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{EAPIs supporting \t{doheader} and \t{newheader}}
+ \label{tab:doheader-table}
+ \begin{tabular}{ll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{Supports \t{doheader} and \t{newheader}?}} \\
+ \midrule
+ 0, 1, 2, 3, 4 & No \\
+ 5, 6 & Yes \\
+ \bottomrule
\end{tabular}
\end{centertable}
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{EAPIs supporting symlinks for \t{doins}} \label{tab:doins-table}
- \begin{tabular}{ l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{\t{doins} supports symlinks?}} \\
- \midrule
- \t{0} & No \\
- \t{1} & No \\
- \t{2} & No \\
- \t{3} & No \\
- \t{4} & Yes \\
- \t{5} & Yes \\
- \bottomrule
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{EAPIs supporting symlinks for \t{doins}}
+ \label{tab:doins-table}
+ \begin{tabular}{ll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{\t{doins} supports symlinks?}} \\
+ \midrule
+ 0, 1, 2, 3 & No \\
+ 4, 5, 6 & Yes \\
+ \bottomrule
\end{tabular}
\end{centertable}
-\ChangeWhenAddingAnEAPI{5}
+\ChangeWhenAddingAnEAPI{6}
\begin{centertable}{\t{doman} language support options for EAPIs}
\label{tab:doman-table}
- \begin{tabular}{ l l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{Language detection by filename?}} &
- \multicolumn{1}{c}{\textbf{Option \t{-i18n} takes precedence?}} \\
- \midrule
- \t{0} & No & Not applicable \\
- \t{1} & No & Not applicable \\
- \t{2} & Yes & No \\
- \t{3} & Yes & No \\
- \t{4} & Yes & Yes \\
- \t{5} & Yes & Yes \\
- \bottomrule
+ \begin{tabular}{lll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{Language detection by filename?}} &
+ \multicolumn{1}{c}{\textbf{Option \t{-i18n} takes precedence?}} \\
+ \midrule
+ 0, 1 & No & Not applicable \\
+ 2, 3 & Yes & No \\
+ 4, 5, 6 & Yes & Yes \\
+ \bottomrule
\end{tabular}
\end{centertable}
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{EAPIs supporting stdin for \t{new*} commands} \label{tab:newfoo-stdin-table}
- \begin{tabular}{ l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{\t{new*} can read from stdin?}} \\
- \midrule
- \t{0} & No \\
- \t{1} & No \\
- \t{2} & No \\
- \t{3} & No \\
- \t{4} & No \\
- \t{5} & Yes \\
- \bottomrule
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{EAPIs supporting stdin for \t{new*} commands}
+ \label{tab:newfoo-stdin-table}
+ \begin{tabular}{ll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{\t{new*} can read from stdin?}} \\
+ \midrule
+ 0, 1, 2, 3, 4 & No \\
+ 5, 6 & Yes \\
+ \bottomrule
\end{tabular}
\end{centertable}
-\ChangeWhenAddingAnEAPI{5}
+\ChangeWhenAddingAnEAPI{6}
\begin{centertable}{EAPIs supporting \t{-{}-host-root} for \t{*\_version} commands}
\label{tab:foo-version-host-root-table}
- \begin{tabular}{ l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{\t{*\_version} supports \t{-{}-host-root}?}} \\
- \midrule
- \t{0} & No \\
- \t{1} & No \\
- \t{2} & No \\
- \t{3} & No \\
- \t{4} & No \\
- \t{5} & Yes \\
- \bottomrule
+ \begin{tabular}{ll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{\t{*\_version} supports \t{-{}-host-root}?}} \\
+ \midrule
+ 0, 1, 2, 3, 4 & No \\
+ 5, 6 & Yes \\
+ \bottomrule
\end{tabular}
\end{centertable}
@@ -627,21 +706,18 @@ exclusion list. Otherwise, add each argument to the inclusion list. Only availab
in table~\ref{tab:compression-table} as supporting \t{docompress}.
\end{description}
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{EAPIs supporting controllable compression} \label{tab:compression-table}
- \begin{tabular}{ l l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{Supports controllable compression?}} &
- \multicolumn{1}{c}{\textbf{Supports \t{docompress}?}} \\
- \midrule
- \t{0} & No & No \\
- \t{1} & No & No \\
- \t{2} & No & No \\
- \t{3} & No & No \\
- \t{4} & Yes & Yes \\
- \t{5} & Yes & Yes \\
- \bottomrule
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{EAPIs supporting controllable compression}
+ \label{tab:compression-table}
+ \begin{tabular}{lll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{Supports controllable compression?}} &
+ \multicolumn{1}{c}{\textbf{Supports \t{docompress}?}} \\
+ \midrule
+ 0, 1, 2, 3 & No & No \\
+ 4, 5, 6 & Yes & Yes \\
+ \bottomrule
\end{tabular}
\end{centertable}
@@ -650,8 +726,9 @@ These functions provide behaviour based upon set or unset use flags. Ebuilds mus
these commands once the current phase function has returned. It is an error if an ebuild calls any
of these functions in global scope.
-If any of these functions is called with a flag value that is not included in \t{IUSE\_EFFECTIVE},
-either behaviour is undefined or it is an error as decided by table~\ref{tab:use-list-strictness}.
+Unless otherwise noted, if any of these functions is called with a flag value that is not included
+in \t{IUSE\_EFFECTIVE}, either behaviour is undefined or it is an error as decided by
+table~\ref{tab:use-list-strictness}.
\begin{description}
\item[use] Returns shell true (0) if the first argument (a \t{USE} flag name) is enabled, false
@@ -676,58 +753,53 @@ either behaviour is undefined or it is an error as decided by table~\ref{tab:use
respectively; \t{\$\{arg4\}} and \t{\$\{arg5\}} default to the empty string. If the USE flag is
set, outputs \t{\$\{arg2\}\$\{arg4\}}. Otherwise, outputs \t{\$\{arg3\}\$\{arg5\}}.
The condition is inverted if the flag name is prefixed with~\t{!}.
- Only available in EAPIs listed in table~\ref{tab:usex-table} as supporting \t{usex}.
+ Only available in EAPIs listed in table~\ref{tab:use-list-functions} as supporting \t{usex}.
+\item[in\_iuse] \featurelabel{in-iuse} Returns shell true (0) if the first argument (a \t{USE} flag
+ name) is included in \t{IUSE\_EFFECTIVE}, false otherwise. Only available in EAPIs listed in
+ table~\ref{tab:use-list-functions} as supporting \t{in\_iuse}.
\end{description}
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{EAPI Behaviour for Use Queries not in IUSE\_EFFECTIVE} \label{tab:use-list-strictness}
- \begin{tabular}{ l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{Behaviour}} \\
- \midrule
- \t{0} & Undefined \\
- \t{1} & Undefined \\
- \t{2} & Undefined \\
- \t{3} & Undefined \\
- \t{4} & Error \\
- \t{5} & Error \\
- \bottomrule
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{EAPI Behaviour for Use Queries not in IUSE\_EFFECTIVE}
+ \label{tab:use-list-strictness}
+ \begin{tabular}{ll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{Behaviour}} \\
+ \midrule
+ 0, 1, 2, 3 & Undefined \\
+ 4, 5, 6 & Error \\
+ \bottomrule
\end{tabular}
\end{centertable}
-\ChangeWhenAddingAnEAPI{5}
+\ChangeWhenAddingAnEAPI{6}
\begin{centertable}{EAPIs supporting empty third argument in \t{use\_with} and \t{use\_enable}}
\label{tab:use-with-third-arg}
- \begin{tabular}{ l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{Supports empty third argument?}} \\
- \midrule
- \t{0} & No \\
- \t{1} & No \\
- \t{2} & No \\
- \t{3} & No \\
- \t{4} & Yes \\
- \t{5} & Yes \\
- \bottomrule
+ \begin{tabular}{ll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{Supports empty third argument?}} \\
+ \midrule
+ 0, 1, 2, 3 & No \\
+ 4, 5, 6 & Yes \\
+ \bottomrule
\end{tabular}
\end{centertable}
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{EAPIs supporting \t{usex}} \label{tab:usex-table}
- \begin{tabular}{ l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{Supports \t{usex}?}} \\
- \midrule
- \t{0} & No \\
- \t{1} & No \\
- \t{2} & No \\
- \t{3} & No \\
- \t{4} & No \\
- \t{5} & Yes \\
- \bottomrule
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{EAPIs supporting \t{usex} and \t{in\_iuse}}
+ \label{tab:use-list-functions}
+ \begin{tabular}{lll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{\t{usex}?}} &
+ \multicolumn{1}{c}{\textbf{\t{in\_iuse}?}} \\
+ \midrule
+ 0, 1, 2, 3, 4 & No & No \\
+ 5 & Yes & No \\
+ 6 & Yes & Yes \\
+ \bottomrule
\end{tabular}
\end{centertable}
@@ -760,9 +832,15 @@ has returned.
the current working directory itself) have permissions \t{a+r,u+w,go-w} and that all directories
under the current working directory additionally have permissions \t{a+x}.
- All arguments to \t{unpack} must be either a filename without path, in which case \t{unpack}
- looks in \t{DISTDIR} for the file, or start with the string \t{./}, in which case \t{unpack}
- uses the argument as a path relative to the working directory.
+ Arguments to \t{unpack} are interpreted as follows:
+ \begin{itemize}
+ \item A filename without path (i.\,e., not containing any slash) is looked up in \t{DISTDIR}.
+ \item An argument starting with the string \t{./} is a path relative to the working directory.
+ \item \featurelabel{unpack-absolute} Otherwise, for EAPIs listed in
+ table~\ref{tab:unpack-behaviour} as supporting absolute and relative paths, the argument is
+ interpreted as a literal path (absolute, or relative to the working directory); for EAPIs
+ listed as \e{not} supporting such paths, \t{unpack} shall abort the build process.
+ \end{itemize}
Any unrecognised file format shall be skipped silently. If unpacking a supported file format
fails, \t{unpack} shall abort the build process.
@@ -790,29 +868,48 @@ has returned.
\item lzma-compressed tar files (\t{*.tar.lzma}). Ebuilds must ensure that LZMA Utils and
GNU tar are installed.
\item xz-compressed files (\t{*.xz}). Ebuilds must ensure that XZ Utils is installed. Only for
- EAPIs listed in table~\ref{tab:unpack-extensions-table} as supporting xz.
- \item xz-compressed tar files (\t{*.tar.xz}). Ebuilds must ensure that XZ Utils and GNU tar are
- installed. Only for EAPIs listed in table~\ref{tab:unpack-extensions-table} as supporting xz.
+ EAPIs listed in table~\ref{tab:unpack-extensions-table} as supporting \t{.xz}.
+ \item xz-compressed tar files (\t{*.tar.xz, *.txz}). Ebuilds must ensure that XZ Utils and
+ GNU tar are installed. Only for EAPIs listed in table~\ref{tab:unpack-extensions-table} as
+ supporting \t{.tar.xz} or \t{.txz}.
\end{itemize}
It is up to the ebuild to ensure that the relevant external utilities are available, whether by
being in the system set or via dependencies.
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{\t{unpack} extensions for EAPIs} \label{tab:unpack-extensions-table}
- \begin{tabular}{ l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{\t{.xz} and \t{.tar.xz}?}} \\
- \midrule
- \t{0} & No \\
- \t{1} & No \\
- \t{2} & No \\
- \t{3} & Yes \\
- \t{4} & Yes \\
- \t{5} & Yes \\
- \bottomrule
- \end{tabular}
-\end{centertable}
+ \featurelabel{unpack-ignore-case} \t{unpack} matches filename extensions in a case-insensitive
+ manner, for EAPIs listed such in table~\ref{tab:unpack-behaviour}.
+
+ \ChangeWhenAddingAnEAPI{6}
+ \begin{centertable}{\t{unpack} behaviour for EAPIs}
+ \label{tab:unpack-behaviour}
+ \begin{tabular}{lll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{Supports absolute and relative paths?}} &
+ \multicolumn{1}{c}{\textbf{Case-insensitive matching?}} \\
+ \midrule
+ 0, 1, 2, 3, 4, 5 & No & No \\
+ 6 & Yes & Yes \\
+ \bottomrule
+ \end{tabular}
+ \end{centertable}
+
+ \ChangeWhenAddingAnEAPI{6}
+ \begin{centertable}{\t{unpack} extensions for EAPIs}
+ \label{tab:unpack-extensions-table}
+ \begin{tabular}{llll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{\t{.xz}?}} &
+ \multicolumn{1}{c}{\textbf{\t{.tar.xz}?}} &
+ \multicolumn{1}{c}{\textbf{\t{.txz}?}} \\
+ \midrule
+ 0, 1, 2 & No & No & No \\
+ 3, 4, 5 & Yes & Yes & No \\
+ 6 & Yes & Yes & Yes \\
+ \bottomrule
+ \end{tabular}
+ \end{centertable}
\item[inherit] See section~\ref{sec:inherit}.
@@ -820,23 +917,75 @@ has returned.
\featurelabel{default-func} Calls the \t{default\_} function for the current phase (see
section~\ref{sec:default-phase-funcs}). Must not be called if the \t{default\_} function does
not exist for the current phase in the current EAPI\@. Only available in EAPIs listed in
- table~\ref{tab:default-function-table}.
+ table~\ref{tab:misc-commands} as supporting \t{default}.
+
+\item[einstalldocs] \featurelabel{einstalldocs} Takes no arguments. Installs the files specified
+ by the \t{DOCS} and \t{HTML\_DOCS} variables or a default set of files, according to
+ Algorithm~\ref{alg:einstalldocs}. If called using \t{nonfatal} and any of the called commands
+ returns a non-zero exit status, returns immediately with the same exit status. Only available
+ in EAPIs listed in table~\ref{tab:misc-commands} as supporting \t{einstalldocs}.
+
+\item[get\_libdir] \featurelabel{get-libdir} Prints the libdir name obtained according to
+ Algorithm~\ref{alg:get-libdir}. Only available in EAPIs listed in table~\ref{tab:misc-commands}
+ as supporting \t{get\_libdir}.
\end{description}
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{EAPIs supporting the \t{default} function} \label{tab:default-function-table}
- \begin{tabular}{ l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{Supports \t{default} function?}} \\
- \midrule
- \t{0} & No \\
- \t{1} & No \\
- \t{2} & Yes \\
- \t{3} & Yes \\
- \t{4} & Yes \\
- \t{5} & Yes \\
- \bottomrule
+\begin{algorithm}
+\caption{einstalldocs logic} \label{alg:einstalldocs}
+\begin{algorithmic}[1]
+\STATE save the value of the install directory for \t{dodoc}
+\STATE set the install directory for \t{dodoc} to \t{/usr/share/doc/\$\{PF\}}
+\IF{the DOCS variable is a non-empty array}
+ \STATE call \t{dodoc -r "\$\{DOCS[@]\}"}
+\ELSIF{the DOCS variable is a non-empty scalar}
+ \STATE call \t{dodoc -r \$\{DOCS\}}
+\ELSIF{the DOCS variable is unset}
+ \FORALL{$d$ matching the filename expansion of \t{README*} \t{ChangeLog} \t{AUTHORS} \t{NEWS}
+ \t{TODO} \t{CHANGES} \t{THANKS} \t{BUGS} \t{FAQ} \t{CREDITS} \t{CHANGELOG}}
+ \IF{file $d$ exists and has a size greater than zero}
+ \STATE call \t{dodoc} with $d$ as argument
+ \ENDIF
+ \ENDFOR
+\ENDIF
+\STATE set the install directory for \t{dodoc} to \t{/usr/share/doc/\$\{PF\}/html}
+\IF{the HTML\_DOCS variable is a non-empty array}
+ \STATE call \t{dodoc -r "\$\{HTML\_DOCS[@]\}"}
+\ELSIF{the HTML\_DOCS variable is a non-empty scalar}
+ \STATE call \t{dodoc -r \$\{HTML\_DOCS\}}
+\ENDIF
+\STATE restore the value of the install directory for \t{dodoc}
+\RETURN shell true (0)
+\end{algorithmic}
+\end{algorithm}
+
+\begin{algorithm}
+\caption{get\_libdir logic} \label{alg:get-libdir}
+\begin{algorithmic}[1]
+\STATE let libdir=lib
+\IF{the ABI environment variable is set}
+ \STATE let libvar=LIBDIR\_\$ABI
+ \IF{the environment variable named by libvar is set}
+ \STATE let libdir=the value of the variable named by libvar
+ \ENDIF
+\ENDIF
+\STATE print the value of libdir
+\end{algorithmic}
+\end{algorithm}
+
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{Misc commands for EAPIs}
+ \label{tab:misc-commands}
+ \begin{tabular}{llll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{\t{default}?}} &
+ \multicolumn{1}{c}{\textbf{\t{einstalldocs}?}} &
+ \multicolumn{1}{c}{\textbf{\t{get\_libdir}?}} \\
+ \midrule
+ 0, 1 & No & No & No \\
+ 2, 3, 4, 5 & Yes & No & No \\
+ 6 & Yes & Yes & Yes \\
+ \bottomrule
\end{tabular}
\end{centertable}
diff --git a/pms.tex b/pms.tex
index ae86b43..c96fc05 100644
--- a/pms.tex
+++ b/pms.tex
@@ -21,8 +21,8 @@
pdfkeywords={Gentoo, package manager, specification},
}
-\CurrentEAPIIs{5}
-\ChangeWhenAddingAnEAPI{5}
+\CurrentEAPIIs{6}
+\ChangeWhenAddingAnEAPI{6}
\begin{document}
\maketitle
diff --git a/profile-variables.tex b/profile-variables.tex
index 6eca502..c47b748 100644
--- a/profile-variables.tex
+++ b/profile-variables.tex
@@ -33,20 +33,17 @@ Other variables, except where they affect only package-manager-specific function
Portage's \t{FEATURES} variable), must not be treated incrementally---later definitions shall
completely override those in parent profiles.
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{Profile-defined \t{IUSE} injection for EAPIs} \label{tab:profile-iuse-injection-table}
- \begin{tabular}{ l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{Supports profile-defined \t{IUSE} injection?}} \\
- \midrule
- \t{0} & No \\
- \t{1} & No \\
- \t{2} & No \\
- \t{3} & No \\
- \t{4} & No \\
- \t{5} & Yes \\
- \bottomrule
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{Profile-defined \t{IUSE} injection for EAPIs}
+ \label{tab:profile-iuse-injection-table}
+ \begin{tabular}{ll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{Supports profile-defined \t{IUSE} injection?}} \\
+ \midrule
+ 0, 1, 2, 3, 4 & No \\
+ 5, 6 & Yes \\
+ \bottomrule
\end{tabular}
\end{centertable}
diff --git a/profiles.tex b/profiles.tex
index a7a8527..c677582 100644
--- a/profiles.tex
+++ b/profiles.tex
@@ -125,21 +125,17 @@ only act on packages that are merged due to a stable keyword in the sense of
subsection~\ref{sec:keywords}. Thus, these files can be used to restrict the feature set deemed
stable in a package.
-\ChangeWhenAddingAnEAPI{5}
-\begin{centertable}{Profile directory support for masking/forcing use flags in stable
-versions only}\label{tab:profile-stablemask}
- \begin{tabular}{ l l }
- \toprule
- \multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{Supports masking/forcing use flags in stable versions?}} \\
- \midrule
- \t{0} & No \\
- \t{1} & No \\
- \t{2} & No \\
- \t{3} & No \\
- \t{4} & No \\
- \t{5} & Yes \\
- \bottomrule
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{Profile directory support for masking/forcing use flags in stable versions only}
+ \label{tab:profile-stablemask}
+ \begin{tabular}{ll}
+ \toprule
+ \multicolumn{1}{c}{\textbf{EAPI}} &
+ \multicolumn{1}{c}{\textbf{Supports masking/forcing use flags in stable versions?}} \\
+ \midrule
+ 0, 1, 2, 3, 4 & No \\
+ 5, 6 & Yes \\
+ \bottomrule
\end{tabular}
\end{centertable}