Gentoo Archives: gentoo-dev

From: "Marty E. Plummer" <hanetzer@×××××××××.com>
To: Ulrich Mueller <ulm@g.o>
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] java-utils-2.eclass: port to EAPI 7
Date: Mon, 21 May 2018 22:13:57
Message-Id: 20180521221317.vp7t4kyo6lo2he6l@proprietary-killer
In Reply to: Re: [gentoo-dev] [PATCH] java-utils-2.eclass: port to EAPI 7 by "Marty E. Plummer"
1 On Mon, May 21, 2018 at 04:47:03PM -0500, Marty E. Plummer wrote:
2 > On Tue, May 08, 2018 at 11:03:47AM +0200, Ulrich Mueller wrote:
3 > > You could inherit eapi7-ver instead of versionator, which would save
4 > > the conditional below.
5 > >
6 > I didn't realize that eapi7-ver now supports 0-6 instead of just 6. I
7 > will rework this and the other patch I sent in for that reason, then.
8 Here we go. The eapi != 7 conditional is needed as eapi7 is 'not
9 supported' by eapi7-ver because its contents are already there.
10 ---
11 eclass/java-utils-2.eclass | 7 ++++---
12 1 file changed, 4 insertions(+), 3 deletions(-)
13
14 diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass
15 index 25e35c33dd2..198d8b511f3 100644
16 --- a/eclass/java-utils-2.eclass
17 +++ b/eclass/java-utils-2.eclass
18 @@ -15,7 +15,8 @@
19 # you should inherit java-pkg-2 for Java packages or java-pkg-opt-2 for packages
20 # that have optional Java support. In addition you can inherit java-ant-2 for
21 # Ant-based packages.
22 -inherit eutils versionator multilib
23 +inherit eutils multilib
24 +[[ ${EAPI} == 7 ]] || inherit eapi7-ver
25
26 IUSE="elibc_FreeBSD"
27
28 @@ -1526,8 +1527,8 @@ java-pkg_is-vm-version-eq() {
29
30 local vm_version="$(java-pkg_get-vm-version)"
31
32 - vm_version="$(get_version_component_range 1-2 "${vm_version}")"
33 - needed_version="$(get_version_component_range 1-2 "${needed_version}")"
34 + vm_version="$(ver_cut 1-2 "${vm_version}")"
35 + needed_version="$(ver_cut 1-2 "${needed_version}")"
36
37 if [[ -z "${vm_version}" ]]; then
38 debug-print "Could not get JDK version from DEPEND"
39 --
40 2.17.0

Replies

Subject Author
Re: [gentoo-dev] [PATCH] java-utils-2.eclass: port to EAPI 7 "Marty E. Plummer" <hanetzer@×××××××××.com>