Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/pms:eapi-7 commit in: /
Date: Sat, 24 Feb 2018 12:58:59
Message-Id: 1519476924.6bda8dc5d0d1b10bcdd6ef79db2947382706e7a8.ulm@gentoo
1 commit: 6bda8dc5d0d1b10bcdd6ef79db2947382706e7a8
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 5 16:08:23 2017 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 24 12:55:24 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=6bda8dc5
7
8 pkg-mgr-commands.tex: Join docompress and dostrip sections.
9
10 dependencies.tex | 4 +-
11 pkg-mgr-commands.tex | 130 +++++++++++++++++++--------------------------------
12 2 files changed, 49 insertions(+), 85 deletions(-)
13
14 diff --git a/dependencies.tex b/dependencies.tex
15 index deede34..7ae119b 100644
16 --- a/dependencies.tex
17 +++ b/dependencies.tex
18 @@ -507,8 +507,8 @@ The following tokens are permitted inside \t{RESTRICT}:
19 \item[fetch] The package's \t{SRC_URI} entries may not be downloaded automatically. If
20 entries are not available, \t{pkg_nofetch} is called. Implies \t{mirror}.
21 \item[strip] No stripping of debug symbols from files to be installed may be performed. In EAPIs
22 - listed in table~\ref{tab:dostrip} as supporting controllable stripping, this behaviour may be
23 - altered by the \t{dostrip} command.
24 + listed in table~\ref{tab:staging-area-commands} as supporting controllable stripping, this
25 + behaviour may be altered by the \t{dostrip} command.
26 \item[userpriv] The package manager may not drop root privileges when building the package.
27 \item[test] The \t{src_test} phase must not be run.
28 \end{description}
29
30 diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex
31 index dd0b02d..ed3af1b 100644
32 --- a/pkg-mgr-commands.tex
33 +++ b/pkg-mgr-commands.tex
34 @@ -768,27 +768,25 @@ has returned.
35
36 \end{description}
37
38 -\subsection{Commands affecting install compression}
39 +\subsection{Commands controlling manipulation of files in the staging area}
40 +These commands are used to control optional manipulations that the package manager may perform on
41 +files in the staging directory \t{ED}, like compressing files or stripping symbols from object
42 +files.
43
44 -\featurelabel{docompress} In EAPIs listed in table~\ref{tab:compression-table} as supporting
45 -controllable compression, the package manager may optionally compress a subset of the files under
46 -the \t{ED} directory. To control which directories may or may not be compressed, the package manager
47 -shall maintain two lists:
48 -
49 -\begin{compactitem}
50 -\item An inclusion list, which initially contains \t{/usr/share/doc}, \t{/usr/share/info} and
51 - \t{/usr/share/man}.
52 -\item An exclusion list, which initially contains \t{/usr/share/doc/\$\{PF\}/html}.
53 -\end{compactitem}
54 +For each of the operations mentioned below, the package manager shall maintain an inclusion list
55 +and an exclusion list, in order to control which directories and files the operation may or may not
56 +be performed upon. The initial contents of the two lists is specified below for each of the
57 +commands, respectively.
58
59 -The optional compression shall be carried out after \t{src_install} has completed, and before the
60 -execution of any subsequent phase function. For each item in the inclusion list, pretend it has the
61 -value of the \t{ED} variable prepended, then:
62 +Any of these operations shall be carried out after \t{src_install} has completed, and before the
63 +execution of any subsequent phase function. For each item in the inclusion list, pretend it has
64 +the value of the \t{ED} variable prepended, then:
65
66 \begin{compactitem}
67 \item If it is a directory, act as if every file or directory immediately under this directory
68 were in the inclusion list.
69 -\item If the item is a file, it may be compressed unless it has been excluded as described below.
70 +\item If the item is a file, the operation may be performed on it, unless it has been excluded as
71 + described below.
72 \item If the item does not exist, it is ignored.
73 \end{compactitem}
74
75 @@ -798,96 +796,62 @@ pretend it has the value of the \t{ED} variable prepended, then:
76 \begin{compactitem}
77 \item If it is a directory, act as if every file or directory immediately under this directory
78 were in the exclusion list.
79 -\item If the item is a file, it shall not be compressed.
80 +\item If the item is a file, the operation shall not be performed on it.
81 \item If the item does not exist, it is ignored.
82 \end{compactitem}
83
84 -The package manager shall take appropriate steps to ensure that its compression mechanisms behave
85 -sensibly even if an item is listed in the inclusion list multiple times, if an item is a symlink,
86 -or if a file is already compressed.
87 -
88 -The following commands may be used in \t{src_install} to alter these lists. It is an error to call
89 -any of these functions from any other phase.
90 -
91 -\begin{description}
92 -\item[docompress] If the first argument is \t{-x}, add each of its subsequent arguments to the
93 -exclusion list. Otherwise, add each argument to the inclusion list. Only available in EAPIs listed
94 -in table~\ref{tab:compression-table} as supporting \t{docompress}.
95 -\end{description}
96 -
97 -\ChangeWhenAddingAnEAPI{7}
98 -\begin{centertable}{EAPIs supporting controllable compression}
99 - \label{tab:compression-table}
100 - \begin{tabular}{lll}
101 - \toprule
102 - \multicolumn{1}{c}{\textbf{EAPI}} &
103 - \multicolumn{1}{c}{\textbf{Supports controllable compression?}} &
104 - \multicolumn{1}{c}{\textbf{Supports \t{docompress}?}} \\
105 - \midrule
106 - 0, 1, 2, 3 & No & No \\
107 - 4, 5, 6, 7 & Yes & Yes \\
108 - \bottomrule
109 - \end{tabular}
110 -\end{centertable}
111 -
112 -\subsection{Commands affecting stripping of symbols}
113 +The package manager shall take appropriate steps to ensure that any operations that it performs on
114 +files in the staging area behave sensibly even if an item is listed in the inclusion list multiple
115 +times or if an item is a symlink.
116
117 -\featurelabel{dostrip} In EAPIs listed in table~\ref{tab:dostrip} as supporting controllable
118 -stripping of symbols, the package manager may strip a subset of the files under the \t{ED}
119 -directory. To control which files may or may not be stripped, the package manager shall maintain
120 -two lists:
121 +\featurelabel{docompress} In EAPIs listed in table~\ref{tab:staging-area-commands} as supporting
122 +controllable compression, the package manager may optionally compress a subset of the files under
123 +the \t{ED} directory. The package manager shall ensure that its compression mechanisms behave
124 +sensibly even if a file is already compressed. For compression, the initial values of the two lists
125 +are as follows:
126
127 \begin{compactitem}
128 -\item An inclusion list. If the \t{RESTRICT} variable described in section~\ref{sec:restrict}
129 - enables a \t{strip} token, this list is initially empty; otherwise it initially contains \t{/}
130 - (the root path).
131 -\item An exclusion list, which initially is empty.
132 +\item The inclusion list contains \t{/usr/share/doc}, \t{/usr/share/info} and \t{/usr/share/man}.
133 +\item The exclusion list contains \t{/usr/share/doc/\$\{PF\}/html}.
134 \end{compactitem}
135
136 -Stripping of symbols shall be carried out after \t{src_install} has completed, and before the
137 -execution of any subsequent phase function. For each item in the inclusion list, pretend it has the
138 -value of the \t{ED} variable prepended, then:
139 +\featurelabel{dostrip} In EAPIs listed in table~\ref{tab:staging-area-commands} as supporting
140 +controllable stripping of symbols, the package manager may strip a subset of the files under the
141 +\t{ED} directory. For stripping of symbols, the initial values of the two lists are as follows:
142
143 \begin{compactitem}
144 -\item If it is a directory, act as if every file or directory immediately under this directory
145 - were in the inclusion list.
146 -\item If the item is a file, it may be stripped unless it has been excluded as described below.
147 -\item If the item does not exist, it is ignored.
148 +\item If the \t{RESTRICT} variable described in section~\ref{sec:restrict} enables a \t{strip}
149 + token, the inclusion list is empty; otherwise it contains \t{/} (the root path).
150 +\item The exclusion list is empty.
151 \end{compactitem}
152
153 -Whether an item is to be excluded is determined as follows: For each item in the exclusion list,
154 -pretend it has the value of the \t{ED} variable prepended, then:
155 -
156 -\begin{compactitem}
157 -\item If it is a directory, act as if every file or directory immediately under this directory
158 - were in the exclusion list.
159 -\item If the item is a file, it shall not be stripped.
160 -\item If the item does not exist, it is ignored.
161 -\end{compactitem}
162 -
163 -The package manager shall take appropriate steps to ensure that its stripping mechanisms behave
164 -sensibly even if an item is listed in the inclusion list multiple times or if an item is a symlink.
165 -
166 -The following command may be used in \t{src_install} to alter these lists. It is an error to call
167 -this function from any other phase.
168 +The following commands may be used in \t{src_install} to alter these lists. It is an error to call
169 +any of these functions from any other phase.
170
171 \begin{description}
172 +\item[docompress] If the first argument is \t{-x}, add each of its subsequent arguments to the
173 + exclusion list for compression. Otherwise, add each argument to the respective inclusion list.
174 + Only available in EAPIs listed in table~\ref{tab:staging-area-commands} as supporting
175 + \t{docompress}.
176 +
177 \item[dostrip] If the first argument is \t{-x}, add each of its subsequent arguments to the
178 - exclusion list. Otherwise, add each argument to the inclusion list. Only available in EAPIs
179 - listed in table~\ref{tab:dostrip} as supporting \t{dostrip}.
180 + exclusion list for stripping of symbols. Otherwise, add each argument to the respective
181 + inclusion list. Only available in EAPIs listed in table~\ref{tab:staging-area-commands} as
182 + supporting \t{dostrip}.
183 \end{description}
184
185 \ChangeWhenAddingAnEAPI{7}
186 -\begin{centertable}{EAPIs supporting controllable stripping}
187 - \label{tab:dostrip}
188 +\begin{centertable}{Commands controlling manipulation of files in the staging area in EAPIs}
189 + \label{tab:staging-area-commands}
190 \begin{tabular}{lll}
191 \toprule
192 \multicolumn{1}{c}{\textbf{EAPI}} &
193 - \multicolumn{1}{c}{\textbf{Supports controllable stripping?}} &
194 - \multicolumn{1}{c}{\textbf{Supports \t{dostrip}?}} \\
195 + \multicolumn{1}{P{13.5em}}{\textbf{Supports controllable compression and \t{docompress}?}} &
196 + \multicolumn{1}{P{10.5em}}{\textbf{Supports controllable stripping and \t{dostrip}?}} \\
197 \midrule
198 - 0, 1, 2, 3, 4, 5, 6 & No & No \\
199 - 7 & Yes & Yes \\
200 + 0, 1, 2, 3 & No & No \\
201 + 4, 5, 6 & Yes & No \\
202 + 7 & Yes & Yes \\
203 \bottomrule
204 \end{tabular}
205 \end{centertable}