1 |
>>>>> On Wed, 21 Jul 2021, Florian Schmaus wrote: |
2 |
|
3 |
> case "${EAPI:-0}" in |
4 |
|
5 |
This could be simplified to ${EAPI} (and no quotation marks). |
6 |
|
7 |
> 4|5|6|7) |
8 |
> - EXPORT_FUNCTIONS src_prepare pkg_preinst pkg_postinst pkg_postrm |
9 |
> + # src_prepare is only exported in EAPI < 8. |
10 |
> + EXPORT_FUNCTIONS src_prepare |
11 |
> + ;& |
12 |
|
13 |
The ;& terminator is a new Bash feature and cannot be used in EAPIs |
14 |
older than 6. (Easy to fix: Simply move the following EXPORT_FUNCTIONS |
15 |
below the case block.) |
16 |
|
17 |
> + 8) |
18 |
> + EXPORT_FUNCTIONS pkg_preinst pkg_postinst pkg_postrm |
19 |
> ;; |
20 |
> *) die "EAPI=${EAPI} is not supported" ;; |
21 |
|
22 |
Please prepend "${ECLASS}: " to the die message. |
23 |
|
24 |
> esac |
25 |
|
26 |
> # @FUNCTION: xdg_src_prepare |
27 |
> # @DESCRIPTION: |
28 |
> # Prepare sources to work with XDG standards. |
29 |
> +# Note that this function is only exported in EAPIs < 8. |
30 |
> xdg_src_prepare() { |
31 |
> xdg_environment_reset |
32 |
|
33 |
I wonder, should the function be defined in EAPI 8 then? It calls |
34 |
default, so presumably ebuilds would rather call xdg_environment_reset |
35 |
directly? |
36 |
|
37 |
Ulrich |