1 |
On Sun, 2019-10-20 at 19:45 +0200, Ulrich Mueller wrote: |
2 |
> > > > > > On Sun, 20 Oct 2019, David Seifert wrote: |
3 |
> > - if [[ -e fonts.alias ]]; then |
4 |
> > - doins fonts.alias || die "failed to install |
5 |
> > fonts.alias" # TODO old EAPI cleanup |
6 |
> > - fi |
7 |
> > + [[ -e fonts.alias ]] && doins fonts.alias |
8 |
> > fi |
9 |
> > } |
10 |
> |
11 |
> Is the function's return value of any importance? The function will |
12 |
> now |
13 |
> return shell false if fonts.alias doesn't exist, while previously it |
14 |
> returned true. |
15 |
|
16 |
No. |
17 |
|
18 |
> |
19 |
> > - [[ -n ${DOCS} ]] && { dodoc ${DOCS} || die "docs installation |
20 |
> > failed" ; } # TODO old EAPI cleanup |
21 |
> > + einstalldocs |
22 |
> |
23 |
> > # install common docs |
24 |
> > - for commondoc in COPYRIGHT README{,.md,.txt} NEWS AUTHORS BUGS |
25 |
> > ChangeLog FONTLOG.txt; do |
26 |
> > + for commondoc in COPYRIGHT FONTLOG.txt; do |
27 |
> > [[ -s ${commondoc} ]] && dodoc ${commondoc} |
28 |
> > done |
29 |
> |
30 |
> This changes the set of installed files, if the DOCS variable is |
31 |
> defined. Is that intentional? |
32 |
> |
33 |
|
34 |
You mean if it's *not* defined? Yes, that's intentional in line with |
35 |
making eclasses behave around DOCS consistently. If that leads to |
36 |
installing READMEwin32.txt, then so be it. Importantly, this allows |
37 |
using DOCS as an array without copypasta-ing around the einstalldocs |
38 |
whitespace-list-vs-array handling code. |
39 |
|
40 |
> > - if [[ -e |
41 |
> > "${EROOT%/}"/etc/fonts/conf.avail/${conffile##*/} ]]; then |
42 |
> > - elog " ${conffile##*/}" |
43 |
> > - fi |
44 |
> > + [[ -e |
45 |
> > "${EROOT%/}"/etc/fonts/conf.avail/${conffile##*/} ]] && elog |
46 |
> > " ${conffile##*/}" |
47 |
> |
48 |
> This doesn't change any functionality, but it adds an overlong line |
49 |
> for |
50 |
> no good reason. |
51 |
|
52 |
The idea was to avoid if statements if you can use the more succinct |
53 |
form. |
54 |
|
55 |
> |
56 |
> Ulrich |