1 |
>>>>> On Fri, 18 Feb 2022, Florian Schmaus wrote: |
2 |
|
3 |
> -case "${EAPI:-0}" in |
4 |
> - 0|1|2|3|4|5|6) inherit eapi7-ver multilib ;; |
5 |
> - *) inherit multilib ;; |
6 |
> +case ${EAPI} in |
7 |
> + [56]) inherit eapi7-ver ;& # fallthrough |
8 |
> + [78]) inherit multilib ;; |
9 |
|
10 |
Please keep the 5|6) etc. syntax, because it is what is used in almost |
11 |
all other eclasses. It is also more future proof, EAPI names aren't |
12 |
limited to a single character. |
13 |
|
14 |
> + *) die "${ECLASS}: EAPI ${EAPI} not supported" ;; |
15 |
|
16 |
Should be ${EAPI:-0} here. |
17 |
|
18 |
> esac |
19 |
|
20 |
More generally, I notice that there is no eclass documentation for any |
21 |
of the functions. |
22 |
|
23 |
Also, error handling is a little strange. It outputs a lot of text, but |
24 |
doesn't die on usage errors. For example: |
25 |
|
26 |
db_ver_to_slot() { |
27 |
if [ $# -ne 1 ]; then |
28 |
eerror "Function db_ver_to_slot needs one argument" >&2 |
29 |
eerror "args given:" >&2 |
30 |
for f in $@ |
31 |
do |
32 |
eerror " - \"$@\"" >&2 |
33 |
done |
34 |
return 1 |
35 |
fi |
36 |
... |
37 |
} |
38 |
|
39 |
Also, f isn't declared as a local variable. In fact, you won't find a |
40 |
single "local" in the whole eclass. |
41 |
|
42 |
Ulrich |