Gentoo Archives: gentoo-commits

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