1 |
commit: cbdee0efb3f2c00e7290fd8e66ff34fd415584de |
2 |
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 29 09:30:43 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=cbdee0ef |
7 |
|
8 |
EAPI 7 has controllable stripping and dostrip. |
9 |
|
10 |
Bug: https://bugs.gentoo.org/203891 |
11 |
|
12 |
dependencies.tex | 4 +++- |
13 |
eapi-differences.tex | 7 ++++++ |
14 |
pkg-mgr-commands.tex | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++ |
15 |
3 files changed, 72 insertions(+), 1 deletion(-) |
16 |
|
17 |
diff --git a/dependencies.tex b/dependencies.tex |
18 |
index 696f478..deede34 100644 |
19 |
--- a/dependencies.tex |
20 |
+++ b/dependencies.tex |
21 |
@@ -506,7 +506,9 @@ The following tokens are permitted inside \t{RESTRICT}: |
22 |
be checked when fetching. |
23 |
\item[fetch] The package's \t{SRC_URI} entries may not be downloaded automatically. If |
24 |
entries are not available, \t{pkg_nofetch} is called. Implies \t{mirror}. |
25 |
-\item[strip] No stripping of debug symbols from files to be installed may be performed. |
26 |
+\item[strip] No stripping of debug symbols from files to be installed may be performed. In EAPIs |
27 |
+ listed in table~\ref{tab:dostrip} as supporting controllable stripping, this behaviour may be |
28 |
+ altered by the \t{dostrip} command. |
29 |
\item[userpriv] The package manager may not drop root privileges when building the package. |
30 |
\item[test] The \t{src_test} phase must not be run. |
31 |
\end{description} |
32 |
|
33 |
diff --git a/eapi-differences.tex b/eapi-differences.tex |
34 |
index 5fb2568..6a2cab7 100644 |
35 |
--- a/eapi-differences.tex |
36 |
+++ b/eapi-differences.tex |
37 |
@@ -287,6 +287,12 @@ Controllable compression & \compactfeatureref{docompress} & |
38 |
\t{docompress} & \compactfeatureref{docompress} & |
39 |
No & Yes & Yes & Yes & Yes \\ |
40 |
|
41 |
+Controllable stripping & \compactfeatureref{dostrip} & |
42 |
+ No & No & No & No & Yes \\ |
43 |
+ |
44 |
+\t{dostrip} & \compactfeatureref{dostrip} & |
45 |
+ No & No & No & No & Yes \\ |
46 |
+ |
47 |
\t{use_with} empty third arg & \compactfeatureref{use-with} & |
48 |
No & Yes & Yes & Yes & Yes \\ |
49 |
|
50 |
@@ -477,6 +483,7 @@ EAPI 7 is EAPI 6 with the following changes: |
51 |
\item \t{eqawarn}, \featureref{eqawarn}. |
52 |
\item \t{die} is guaranteed to work in a subshell, \featureref{subshell-die}. |
53 |
\item \t{domo} installs to \t{/usr}, \featureref{domo-path}. |
54 |
+\item Controllable stripping and \t{dostrip}, \featureref{dostrip}. |
55 |
\end{compactitem} |
56 |
|
57 |
\ChangeWhenAddingAnEAPI{7} |
58 |
|
59 |
diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex |
60 |
index b0ed22e..dd0b02d 100644 |
61 |
--- a/pkg-mgr-commands.tex |
62 |
+++ b/pkg-mgr-commands.tex |
63 |
@@ -830,6 +830,68 @@ in table~\ref{tab:compression-table} as supporting \t{docompress}. |
64 |
\end{tabular} |
65 |
\end{centertable} |
66 |
|
67 |
+\subsection{Commands affecting stripping of symbols} |
68 |
+ |
69 |
+\featurelabel{dostrip} In EAPIs listed in table~\ref{tab:dostrip} as supporting controllable |
70 |
+stripping of symbols, the package manager may strip a subset of the files under the \t{ED} |
71 |
+directory. To control which files may or may not be stripped, the package manager shall maintain |
72 |
+two lists: |
73 |
+ |
74 |
+\begin{compactitem} |
75 |
+\item An inclusion list. If the \t{RESTRICT} variable described in section~\ref{sec:restrict} |
76 |
+ enables a \t{strip} token, this list is initially empty; otherwise it initially contains \t{/} |
77 |
+ (the root path). |
78 |
+\item An exclusion list, which initially is empty. |
79 |
+\end{compactitem} |
80 |
+ |
81 |
+Stripping of symbols shall be carried out after \t{src_install} has completed, and before the |
82 |
+execution of any subsequent phase function. For each item in the inclusion list, pretend it has the |
83 |
+value of the \t{ED} variable prepended, then: |
84 |
+ |
85 |
+\begin{compactitem} |
86 |
+\item If it is a directory, act as if every file or directory immediately under this directory |
87 |
+ were in the inclusion list. |
88 |
+\item If the item is a file, it may be stripped unless it has been excluded as described below. |
89 |
+\item If the item does not exist, it is ignored. |
90 |
+\end{compactitem} |
91 |
+ |
92 |
+Whether an item is to be excluded is determined as follows: For each item in the exclusion list, |
93 |
+pretend it has the value of the \t{ED} variable prepended, then: |
94 |
+ |
95 |
+\begin{compactitem} |
96 |
+\item If it is a directory, act as if every file or directory immediately under this directory |
97 |
+ were in the exclusion list. |
98 |
+\item If the item is a file, it shall not be stripped. |
99 |
+\item If the item does not exist, it is ignored. |
100 |
+\end{compactitem} |
101 |
+ |
102 |
+The package manager shall take appropriate steps to ensure that its stripping mechanisms behave |
103 |
+sensibly even if an item is listed in the inclusion list multiple times or if an item is a symlink. |
104 |
+ |
105 |
+The following command may be used in \t{src_install} to alter these lists. It is an error to call |
106 |
+this function from any other phase. |
107 |
+ |
108 |
+\begin{description} |
109 |
+\item[dostrip] If the first argument is \t{-x}, add each of its subsequent arguments to the |
110 |
+ exclusion list. Otherwise, add each argument to the inclusion list. Only available in EAPIs |
111 |
+ listed in table~\ref{tab:dostrip} as supporting \t{dostrip}. |
112 |
+\end{description} |
113 |
+ |
114 |
+\ChangeWhenAddingAnEAPI{7} |
115 |
+\begin{centertable}{EAPIs supporting controllable stripping} |
116 |
+ \label{tab:dostrip} |
117 |
+ \begin{tabular}{lll} |
118 |
+ \toprule |
119 |
+ \multicolumn{1}{c}{\textbf{EAPI}} & |
120 |
+ \multicolumn{1}{c}{\textbf{Supports controllable stripping?}} & |
121 |
+ \multicolumn{1}{c}{\textbf{Supports \t{dostrip}?}} \\ |
122 |
+ \midrule |
123 |
+ 0, 1, 2, 3, 4, 5, 6 & No & No \\ |
124 |
+ 7 & Yes & Yes \\ |
125 |
+ \bottomrule |
126 |
+ \end{tabular} |
127 |
+\end{centertable} |
128 |
+ |
129 |
\subsection{USE list functions} |
130 |
These functions provide behaviour based upon set or unset use flags. Ebuilds must not run any of |
131 |
these commands once the current phase function has returned. It is an error if an ebuild calls any |