Gentoo Archives: gentoo-dev

From: Andrew Savchenko <bircoph@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] subversion.eclass: support for EAPI 6
Date: Sat, 30 Jul 2016 09:34:58
Message-Id: 20160730123407.1d5ac5b737bc74d7c1684a92@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH] subversion.eclass: support for EAPI 6 by "Michał Górny"
1 On Sat, 30 Jul 2016 07:37:08 +0200 Michał Górny wrote:
2 > > @@ -116,7 +123,8 @@ ESVN_PROJECT="${ESVN_PROJECT:-${PN/-svn}}"
3 > >
4 > > # @ECLASS-VARIABLE: ESVN_BOOTSTRAP
5 > > # @DESCRIPTION:
6 > > -# bootstrap script or command like autogen.sh or etc..
7 > > +# Bootstrap script or command like autogen.sh or etc..
8 > > +# Removed in EAPI 6 and later.
9 > > ESVN_BOOTSTRAP="${ESVN_BOOTSTRAP:-}"
10 > >
11 > > # @ECLASS-VARIABLE: ESVN_PATCHES
12 > > @@ -127,6 +135,8 @@ ESVN_BOOTSTRAP="${ESVN_BOOTSTRAP:-}"
13 > > #
14 > > # Patches are searched both in ${PWD} and ${FILESDIR}, if not found in either
15 > > # location, the installation dies.
16 > > +#
17 > > +# Removed in EAPI 6 and later, use PATCHES instead.
18 > > ESVN_PATCHES="${ESVN_PATCHES:-}"
19 >
20 > It would be a good idea to check if the variables are set and die if
21 > they are, so people don't accidentally use them.
22
23 Impossible to implement. These variables (as well as all other
24 ESVN_* variables) are usually set after subversion eclass is
25 inherited. And even if I'll duplicate this check in all available
26 functions (which is ridiculous by itself), it still will not help,
27 since several functions are removed from EAPI 6 and people may
28 rely on default behaviour of src_prepare() alone.
29
30 > > # @ECLASS-VARIABLE: ESVN_RESTRICT
31 > > @@ -355,7 +365,10 @@ subversion_fetch() {
32 > > # @FUNCTION: subversion_bootstrap
33 > > # @DESCRIPTION:
34 > > # Apply patches in ${ESVN_PATCHES} and run ${ESVN_BOOTSTRAP} if specified.
35 > > +# Removed in EAPI 6 and later.
36 > > subversion_bootstrap() {
37 > > + has "${EAPI:-0}" 6 && die "${FUNCNAME[1]} is removed from subversion.eclass in EAPI 6 and later"
38 > > +
39 >
40 > Reverse the logic. This will require updating in every EAPI while it is
41 > rather unlikely the next EAPIs will return to previous behavior.
42
43 Done.
44
45 Best regards,
46 Andrew Savchenko

Attachments

File name MIME type
subversion.eclass.patch text/x-diff

Replies

Subject Author
Re: [gentoo-dev] [PATCH] subversion.eclass: support for EAPI 6 Andrew Savchenko <bircoph@g.o>