summaryrefslogtreecommitdiff
blob: 70b69b25890ed2610a02b1ef1bc5297d37d83f7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
\section{Available commands}
\label{sec:ebuild-env-commands}

This section documents the commands available to an ebuild. Unless otherwise specified, they may be
aliases, shell functions, or executables in the ebuild's \t{PATH}.

When an ebuild is being sourced for metadata querying rather than for a build (that is to say,
when none of the \t{src\_} or \t{pkg\_} functions are to be called), no external command may
be executed. The package manager may take steps to enforce this.

\subsection{System commands}

Any ebuild not listed in the system set for the active profile(s) may assume the presence of every
command that is always provided by the system set for that profile. However, it must target the
lowest common denominator of all systems on which it might be installed---in most cases this means
that the only packages that can be assumed to be present are those listed in the \t{base} profile or
equivalent, which is inherited by all available profiles. If an ebuild requires any applications not
provided by the system profile, or that are provided conditionally based on USE flags, appropriate
dependencies must be used to ensure their presence.

\subsubsection{Guaranteed system commands}
\label{sec:guaranteed-system-commands}

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{http://www.gentoo.org/proj/en/council/meeting-logs/20091109.txt}).\label{fn:bash3.2}}.
\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.
\item \featurelabel{gnu-find} \t{find} and \t{xargs} must be available, and must support all forms
    of invocations valid for GNU findutils version 4.4 or later. Only for EAPIs listed in
    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
    \end{tabular}
\end{centertable}

\subsection{Commands provided by package dependencies}

In some cases a package's build process will require the availability of executables not provided by
the core system, a common example being autotools. The availability of commands provided by the
particular types of dependencies is explained in section~\ref{sec:dependency-classes}.

\subsection{Ebuild-specific Commands}
\input{pkg-mgr-commands.tex}

% vim: set filetype=tex fileencoding=utf8 et tw=100 spell spelllang=en :

%%% Local Variables:
%%% mode: latex
%%% TeX-master: "pms"
%%% LaTeX-indent-level: 4
%%% LaTeX-item-indent: 0
%%% TeX-brace-indent-level: 4
%%% End: