Gentoo Archives: gentoo-pms

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-pms@l.g.o
Subject: [gentoo-pms] [PATCH 19/22] EAPI 6 has einstalldocs.
Date: Thu, 15 Oct 2015 10:51:08
Message-Id: 1444906221-30505-20-git-send-email-ulm@gentoo.org
In Reply to: [gentoo-pms] EAPI 6 draft for review by "Ulrich Müller"
1 This also adds support for an empty DOCS variable and for directories
2 in DOCS.
3
4 Bug: 459692
5 Bug: 463736
6 Bug: 481980
7 ---
8 eapi-differences.tex | 4 ++++
9 pkg-mgr-commands.tex | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
10 2 files changed, 52 insertions(+)
11
12 diff --git a/eapi-differences.tex b/eapi-differences.tex
13 index 88b8c6f..30ed46b 100644
14 --- a/eapi-differences.tex
15 +++ b/eapi-differences.tex
16 @@ -234,6 +234,9 @@ Controllable compression & \compactfeatureref{docompress} &
17 \t{default} function & \compactfeatureref{default-func} &
18 * & Yes & Yes & Yes & Yes \\
19
20 +\t{einstalldocs} & \compactfeatureref{einstalldocs} &
21 + No & No & No & No & Yes \\
22 +
23 File mtimes preserved & \compactfeatureref{mtime-preserve} &
24 Undefined & Yes & Yes & Yes & Yes \\
25
26 @@ -353,6 +356,7 @@ EAPI 6 is EAPI 5 with the following changes:
27 \item \t{unpack} supports absolute and relative paths, \featureref{unpack-absolute}.
28 \item \t{unpack} supports \t{.txz}, \featureref{unpack-extensions}.
29 \item \t{unpack} matches filename extensions case-insensitively, \featureref{unpack-ignore-case}.
30 +\item \t{einstalldocs} support, \featureref{einstalldocs}.
31 \end{compactitem}
32
33 \ChangeWhenAddingAnEAPI{6}
34 diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex
35 index 5611fa8..cf1abf7 100644
36 --- a/pkg-mgr-commands.tex
37 +++ b/pkg-mgr-commands.tex
38 @@ -919,8 +919,42 @@ has returned.
39 section~\ref{sec:default-phase-funcs}). Must not be called if the \t{default\_} function does
40 not exist for the current phase in the current EAPI\@. Only available in EAPIs listed in
41 table~\ref{tab:default-function-table}.
42 +
43 +\item[einstalldocs] \featurelabel{einstalldocs} Takes no arguments. Installs the files specified
44 + by the \t{DOCS} and \t{HTML\_DOCS} variables or a default set of files, according to
45 + Algorithm~\ref{alg:einstalldocs}. If called using \t{nonfatal} and any of the called commands
46 + returns a non-zero exit status, returns immediately with the same exit status. Only available
47 + in EAPIs listed in table~\ref{tab:einstalldocs} as supporting \t{einstalldocs}.
48 \end{description}
49
50 +\begin{algorithm}
51 +\caption{\t{einstalldocs} logic} \label{alg:einstalldocs}
52 +\begin{algorithmic}[1]
53 +\STATE save the value of the install directory for \t{dodoc}
54 +\STATE call \t{docinto .} \COMMENT{sets the directory to \t{/usr/share/doc/\$\{PF\}}}
55 +\IF{the DOCS variable is a non-empty array}
56 + \STATE call \t{dodoc -r "\$\{DOCS[@]\}"}
57 +\ELSIF{the DOCS variable is a non-empty scalar}
58 + \STATE call \t{dodoc -r \$\{DOCS\}}
59 +\ELSIF{the DOCS variable is unset}
60 + \FORALL{$d$ matching the filename expansion of \t{README*} \t{ChangeLog} \t{AUTHORS} \t{NEWS}
61 + \t{TODO} \t{CHANGES} \t{THANKS} \t{BUGS} \t{FAQ} \t{CREDITS} \t{CHANGELOG}}
62 + \IF{file $d$ exists and has a size greater than zero}
63 + \STATE call \t{dodoc} with $d$ as argument
64 + \ENDIF
65 + \ENDFOR
66 +\ENDIF
67 +\STATE call \t{docinto html} \COMMENT{sets the directory to \t{/usr/share/doc/\$\{PF\}/html}}
68 +\IF{the HTML\_DOCS variable is a non-empty array}
69 + \STATE call \t{dodoc -r "\$\{HTML\_DOCS[@]\}"}
70 +\ELSIF{the HTML\_DOCS variable is a non-empty scalar}
71 + \STATE call \t{dodoc -r \$\{HTML\_DOCS\}}
72 +\ENDIF
73 +\STATE restore the value of the install directory for \t{dodoc}
74 +\RETURN shell true (0)
75 +\end{algorithmic}
76 +\end{algorithm}
77 +
78 \ChangeWhenAddingAnEAPI{6}
79 \begin{centertable}{EAPIs supporting the \t{default} function}
80 \label{tab:default-function-table}
81 @@ -935,6 +969,20 @@ has returned.
82 \end{tabular}
83 \end{centertable}
84
85 +\ChangeWhenAddingAnEAPI{6}
86 +\begin{centertable}{EAPIs supporting \t{einstalldocs}}
87 + \label{tab:einstalldocs}
88 + \begin{tabular}{ l l }
89 + \toprule
90 + \multicolumn{1}{c}{\textbf{EAPI}} &
91 + \multicolumn{1}{c}{\textbf{Supports \t{einstalldocs}?}} \\
92 + \midrule
93 + 0, 1, 2, 3, 4, 5 & No \\
94 + 6 & Yes \\
95 + \bottomrule
96 + \end{tabular}
97 +\end{centertable}
98 +
99 \subsubsection{Debug Commands}
100 The following commands are available for debugging. Normally all of these commands should be no ops;
101 a package manager may provide a special debug mode where these commands instead do something.
102 --
103 2.6.1

Replies

Subject Author
Re: [gentoo-pms] [PATCH 19/22] EAPI 6 has einstalldocs. David Leverton <levertond@××××××××××.com>