Gentoo Archives: gentoo-dev

From: Ulrich Mueller <ulm@g.o>
To: Florian Schmaus <flow@g.o>
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH v2] xdg.eclass: add EAPI 8 support
Date: Wed, 21 Jul 2021 16:37:30
Message-Id: uim13hbd1@gentoo.org
In Reply to: [gentoo-dev] [PATCH v2] xdg.eclass: add EAPI 8 support by Florian Schmaus
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

Attachments

File name MIME type
signature.asc application/pgp-signature