Gentoo Archives: gentoo-pms

From: "Michał Górny" <mgorny@g.o>
To: gentoo-pms@l.g.o
Cc: "Ulrich Müller" <ulm@g.o>
Subject: [gentoo-pms] [PATCH 05/28] EAPI 7 supports directories for profile files.
Date: Wed, 04 Oct 2017 20:47:34
Message-Id: 20171004204712.10391-6-mgorny@gentoo.org
In Reply to: [gentoo-pms] [PATCHES] EAPI 7, first draft for review by "Michał Górny"
1 From: Ulrich Müller <ulm@g.o>
2
3 Bug: https://bugs.gentoo.org/282296
4 ---
5 eapi-differences.tex | 5 +++++
6 profiles.tex | 38 +++++++++++++++++++++++++++++++-------
7 2 files changed, 36 insertions(+), 7 deletions(-)
8
9 diff --git a/eapi-differences.tex b/eapi-differences.tex
10 index 9d7ec60..44869c0 100644
11 --- a/eapi-differences.tex
12 +++ b/eapi-differences.tex
13 @@ -44,6 +44,9 @@ of this document for a complete table of previous EAPIs.
14 \t{package.mask} directory & \compactfeatureref{package-mask-dir} &
15 No & No & No & No & Yes \\
16
17 +Profile files as directories & \compactfeatureref{profile-file-dirs} &
18 + No & No & No & No & Yes \\
19 +
20 Stable use masking/forcing & \compactfeatureref{stablemask} &
21 No & No & Yes & Yes & Yes \\
22
23 @@ -377,6 +380,8 @@ EAPI 7 is EAPI 6 with the following changes:
24
25 \begin{compactitem}
26 \item \t{profiles/package.mask} can be a directory, \featureref{package-mask-dir}.
27 +\item \t{package.mask}, \t{package.use}, \t{use.*} and \t{package.use.*} in a profile can be
28 + directories, \featureref{profile-file-dirs}.
29 \item \t{dohtml} banned, \featureref{banned-commands}.
30 \end{compactitem}
31
32 diff --git a/profiles.tex b/profiles.tex
33 index 0d7164e..99e84ea 100644
34 --- a/profiles.tex
35 +++ b/profiles.tex
36 @@ -69,6 +69,27 @@ parent profile's list is taken, and the current profile's list appended. If any
37 hyphen, then any lines previous to it whose contents are equal to the remainder of that line are
38 removed from the list. Once again, blank lines and those beginning with a \# are discarded.
39
40 +\featurelabel{profile-file-dirs} In EAPIs listed in table~\ref{tab:profile-file-dirs} as supporting
41 +directories for profile files, any of the files \t{package.mask}, \t{package.use}, \t{use.*} and
42 +\t{package.use.*} mentioned below can be a directory instead of a regular file. Files contained
43 +in that directory, unless their name begins with a dot, will be concatenated in order of their
44 +filename in the POSIX locale and the result will be processed as if it were a single file.
45 +Any subdirectories will be ignored.
46 +
47 +\ChangeWhenAddingAnEAPI{7}
48 +\begin{centertable}{EAPIs supporting directories for profile files}
49 + \label{tab:profile-file-dirs}
50 + \begin{tabular}{ll}
51 + \toprule
52 + \multicolumn{1}{c}{\textbf{EAPI}} &
53 + \multicolumn{1}{c}{\textbf{Supports directories for profile files?}} \\
54 + \midrule
55 + 0, 1, 2, 3, 4, 5, 6 & No \\
56 + 7 & Yes \\
57 + \bottomrule
58 + \end{tabular}
59 +\end{centertable}
60 +
61 \subsection{packages}
62 The \t{packages} file is used to define the `system set' for this profile.
63 After the above rules for inheritance and comments are applied, its lines must take one of two
64 @@ -84,7 +105,8 @@ but is mentioned here for completeness.
65 \subsection{package.mask}
66 \t{package.mask} is used to prevent packages from being installed on a given profile. Each line
67 contains one package dependency specification; anything matching this specification will not be
68 -installed unless unmasked by the user's configuration.
69 +installed unless unmasked by the user's configuration. In some EAPIs, \t{package.mask} can be a
70 +directory instead of a regular file as per section~\ref{sec:line-stacking}.
71
72 Note that the \t{-spec} syntax can be used to remove a mask in a parent profile, but not
73 necessarily a global mask (from \t{profiles/package.mask}, section~\ref{profiles-package.mask}).
74 @@ -99,17 +121,19 @@ has severe adverse effects on USE-based and slot-based dependencies, its use is
75 and package manager support must be regarded as purely optional.
76
77 \subsection{package.use}
78 -The \t{package.use} file may be used by the package manager to override the default USE flags specified
79 -by \t{make.defaults} on a per package basis. The format is to have a package dependency specification,
80 -and then a space delimited list of USE flags to enable. A USE flag in the form of \t{-flag} indicates
81 -that the package should have the USE flag disabled. The package dependency specification is limited to
82 -the forms defined by the directory's EAPI.
83 +The \t{package.use} file may be used by the package manager to override the default USE flags
84 +specified by \t{make.defaults} on a per package basis. The format is to have a package dependency
85 +specification, and then a space delimited list of USE flags to enable. A USE flag in the form of
86 +\t{-flag} indicates that the package should have the USE flag disabled. The package dependency
87 +specification is limited to the forms defined by the directory's EAPI. In some EAPIs,
88 +\t{package.use} can be a directory instead of a regular file as per section~\ref{sec:line-stacking}.
89
90 \subsection{USE masking and forcing}
91 This section covers the eight files \t{use.mask}, \t{use.force}, \t{use.stable.mask},
92 \t{use.stable.force}, \t{package.use.mask}, \t{package.use.force}, \t{package.use.stable.mask},
93 and \t{package.use.\allowbreak stable.force}. They are described together because they interact in
94 -a non-trivial manner.
95 +a non-trivial manner. In some EAPIs, these files can be directories instead of regular files as per
96 +section~\ref{sec:line-stacking}.
97
98 Simply speaking, \t{use.mask} and \t{use.force} are used to say that a given USE flag must never or
99 always, respectively, be enabled when using this profile. \t{package.use.mask} and
100 --
101 2.14.2