Gentoo Archives: gentoo-pms

From: David Leverton <levertond@××××××××××.com>
To: gentoo-pms@l.g.o
Subject: Re: [gentoo-pms] [PATCH 19/22] EAPI 6 has einstalldocs.
Date: Tue, 03 Nov 2015 17:24:46
Message-Id: 5638EDD7.2020209@googlemail.com
In Reply to: [gentoo-pms] [PATCH 19/22] EAPI 6 has einstalldocs. by "Ulrich Müller"
1 Ulrich Müller wrote:
2 > +\begin{algorithm}
3 > +\caption{\t{einstalldocs} logic} \label{alg:einstalldocs}
4 > +\begin{algorithmic}[1]
5 > +\STATE save the value of the install directory for \t{dodoc}
6 > +\STATE call \t{docinto .} \COMMENT{sets the directory to \t{/usr/share/doc/\$\{PF\}}}
7
8 Am I right in thinking that this creates /usr/share/doc/${PF} even if
9 there end up being no docs to install?
10
11 > +\IF{the DOCS variable is a non-empty array}
12 > + \STATE call \t{dodoc -r "\$\{DOCS[@]\}"}
13 > +\ELSIF{the DOCS variable is a non-empty scalar}
14 > + \STATE call \t{dodoc -r \$\{DOCS\}}
15 > +\ELSIF{the DOCS variable is unset}
16 > + \FORALL{$d$ matching the filename expansion of \t{README*} \t{ChangeLog} \t{AUTHORS} \t{NEWS}
17 > + \t{TODO} \t{CHANGES} \t{THANKS} \t{BUGS} \t{FAQ} \t{CREDITS} \t{CHANGELOG}}
18 > + \IF{file $d$ exists and has a size greater than zero}
19 > + \STATE call \t{dodoc} with $d$ as argument
20 > + \ENDIF
21 > + \ENDFOR
22 > +\ENDIF
23 > +\STATE call \t{docinto html} \COMMENT{sets the directory to \t{/usr/share/doc/\$\{PF\}/html}}
24
25 Likewise, creates /usr/share/doc/${PF}/html even if there are no HTML docs?
26
27 > +\IF{the HTML\_DOCS variable is a non-empty array}
28 > + \STATE call \t{dodoc -r "\$\{HTML\_DOCS[@]\}"}
29 > +\ELSIF{the HTML\_DOCS variable is a non-empty scalar}
30 > + \STATE call \t{dodoc -r \$\{HTML\_DOCS\}}
31 > +\ENDIF
32 > +\STATE restore the value of the install directory for \t{dodoc}
33 > +\RETURN shell true (0)
34 > +\end{algorithmic}
35 > +\end{algorithm}

Replies