summaryrefslogtreecommitdiff
blob: eb453e1434cc16abd66baa933d6b88d99ff469f3 (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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
\section{Profile variables}
\label{sec:profile-variables}

This section documents variables that have special meaning, or special behaviour, when defined in a
profile's \t{make.defaults} file.

\subsection{Incremental Variables}
\i{Incremental} variables must stack between parent and child profiles in the following manner:
Beginning with the highest parent profile, tokenise the variable's value based on whitespace and
concatenate the lists. Then, for any token $T$ beginning with a hyphen, remove it and any previous
tokens whose value is equal to $T$ with the hyphen removed, or, if $T$ is equal to \t{-*}, remove
all previous values. Note that because of this treatment, the order of tokens in the final result is
arbitrary, not necessarily related to the order of tokens in any given profile. The following
variables must be treated in this fashion:
\begin{compactitem}
\item \t{USE}
\item \t{USE\_EXPAND}
\item \t{USE\_EXPAND\_HIDDEN}
\item \t{CONFIG\_PROTECT}
\item \t{CONFIG\_PROTECT\_MASK}
\item Any variable whose name is listed in \t{USE\_EXPAND}
\end{compactitem}

If the package manager supports any EAPI listed in table~\ref{tab:profile-iuse-injection-table} as
using profile-defined \t{IUSE} injection, the following variables must also be treated
incrementally; otherwise, the following variables may or may not be treated incrementally:
\begin{compactitem}
\item \t{IUSE\_IMPLICIT}
\item \t{USE\_EXPAND\_IMPLICIT}
\item Any variable whose name is \t{USE\_EXPAND\_VALUES\_\$\{value\}}, where \t{\$\{value\}} is any
    value in \t{USE\_EXPAND\_IMPLICIT}.
\end{compactitem}

Other variables, except where they affect only package-manager-specific functionality (such as
Portage's \t{FEATURES} variable), must not be treated incrementally---later definitions shall
completely override those in parent profiles.

\begin{centertable}{Profile-defined \t{IUSE} injection for EAPIs} \label{tab:profile-iuse-injection-table}
\IFKDEBUILDELSE
{
    \begin{tabular}{ l 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{kdebuild-1} & No \\
    \t{2} & No \\
    \t{3} & Yes \\
    \bottomrule
    \end{tabular}
}{
    \begin{tabular}{ l 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} & Yes \\
    \bottomrule
    \end{tabular}
}
\end{centertable}

\subsection{Specific variables and their meanings}
The following variables have specific meanings when set in profiles.
\begin{description}
\item[ARCH] The system's architecture. Must be a value listed in \t{profiles/arch.list}; see
    section~\ref{arch.list} for more information. Must be equal to the primary \t{KEYWORD} for this
    profile.
\item[CONFIG\_PROTECT, CONFIG\_PROTECT\_MASK] Contain whitespace-delimited lists used to control the
    configuration file protection. Described more fully in chapter~\ref{sec:config-protect}.
\item[USE] Defines the list of default USE flags for this profile. Flags may be added or removed by
    the user's configuration. \t{USE\_EXPAND} values must not be specified in this way.
\item[USE\_EXPAND] Defines a list of variables which are to be treated incrementally and whose
    contents are to be expanded into the USE variable as passed to ebuilds. See
    section~\ref{sec:use-iuse-handling} for details.
\item[USE\_EXPAND\_UNPREFIXED] Similar to \t{USE\_EXPAND}, but no prefix is used. If the repository
    contains any package using an EAPI supporting profile-defined \t{IUSE} injection (see
    table~\ref{tab:profile-iuse-injection-table}), this list must contain at least \t{ARCH}. See
    section~\ref{sec:use-iuse-handling} for details.
\item[USE\_EXPAND\_HIDDEN] Contains a (possibly empty) subset of names from \t{USE\_EXPAND} and
    \t{USE\_EXPAND\_UNPREFIXED}. The package manager may use this set as a hint to avoid displaying
    uninteresting or unhelpful information to an end user.
\item[USE\_EXPAND\_IMPLICIT, IUSE\_IMPLICIT] Used to inject implicit values into \t{IUSE}. See
    section~\ref{sec:use-iuse-handling} for details.
\end{description}

In addition, for EAPIs listed in table~\ref{tab:profile-iuse-injection-table} as supporting profile
defined \t{IUSE} injection, the variables named in \t{USE\_EXPAND} and \t{USE\_EXPAND\_UNPREFIXED}
have special handling as described in section~\ref{sec:use-iuse-handling}.

Any other variables set in \t{make.defaults} must be passed on into the ebuild environment as-is,
and are not required to be interpreted by the package manager.

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

%%% Local Variables:
%%% mode: latex
%%% TeX-master: "pms"
%%% End: