From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7B4C51382C5 for ; Mon, 21 May 2018 21:47:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E9855E0891; Mon, 21 May 2018 21:47:36 +0000 (UTC) Received: from mx-out2.startmail.com (mx-out2.startmail.com [145.131.90.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8CB9BE087F for ; Mon, 21 May 2018 21:47:36 +0000 (UTC) Date: Mon, 21 May 2018 16:47:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=startmail.com; s=2017-11; t=1526939254; bh=yhIQ61JXX3336C1lbiPhKoU2W5lRYBCAdydcr09QTQ4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HpsOASTNV/luvQ+39gKbefYplaCVxltG3h0L/rx/895gj0R1pJGLGDzxEtZ+5W/BX cq7IXLl6SEcEmti2ZIaiKm728MRsl8dNJ/BIuwXOJlV+xiQGmsENfpuGU57PgiiFfq nUuxQuuFNyeC28Eupi6iWxwzpHsFGWH0Kqi8UDBpAK3cYgeVhfr1LjE6Fnwpr75v46 LRBWGzWa90vtr0m9K1u8B5uP6vf+4+RpzITMcNY9bUitHzxrKfiXBaQAYTOxWLwif/ f1p/6JFjGYUtTkF30UUaAW+GMeABBlcH8l8GWJFUiEq8dPMD7fcELVMQBMQVTYLXeS GkKXETKWZCnWA== From: "Marty E. Plummer" To: Ulrich Mueller Cc: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [PATCH] java-utils-2.eclass: port to EAPI 7 Message-ID: <20180521214702.l5pbc2nved4yfwsa@proprietary-killer> References: <20180508062236.24304-1-hanetzer@startmail.com> <23281.26611.329650.560845@a1i15.kph.uni-mainz.de> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <23281.26611.329650.560845@a1i15.kph.uni-mainz.de> X-Archives-Salt: 49a938a9-5d54-468c-a5e0-64dd2c6924c9 X-Archives-Hash: ab5be466061faef040cd171f05425065 On Tue, May 08, 2018 at 11:03:47AM +0200, Ulrich Mueller wrote: > >>>>> On Tue, 8 May 2018, Marty E Plummer wrote: > > > --- > > eclass/java-utils-2.eclass | 14 +++++++++++--- > > 1 file changed, 11 insertions(+), 3 deletions(-) > > > diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass > > index 25e35c33dd2..47bbb64ffd4 100644 > > --- a/eclass/java-utils-2.eclass > > +++ b/eclass/java-utils-2.eclass > > @@ -15,7 +15,7 @@ > > # you should inherit java-pkg-2 for Java packages or java-pkg-opt-2 for packages > > # that have optional Java support. In addition you can inherit java-ant-2 for > > # Ant-based packages. > > -inherit eutils versionator multilib > > +has "${EAPI:-0}" 0 1 2 3 4 5 6 && inherit eutils versionator multilib > > You could inherit eapi7-ver instead of versionator, which would save > the conditional below. > I didn't realize that eapi7-ver now supports 0-6 instead of just 6. I will rework this and the other patch I sent in for that reason, then. > > IUSE="elibc_FreeBSD" > > > @@ -1526,8 +1526,16 @@ java-pkg_is-vm-version-eq() { > > > local vm_version="$(java-pkg_get-vm-version)" > > > - vm_version="$(get_version_component_range 1-2 "${vm_version}")" > > - needed_version="$(get_version_component_range 1-2 "${needed_version}")" > > + case ${EAPI} in > > + 0|1|2|3|4|5|6) > > + vm_version="$(get_version_component_range 1-2 "${vm_version}")" > > + needed_version="$(get_version_component_range 1-2 "${needed_version}")" > > + ;; > > + 7) > > + vm_version="$(ver_cut 1-2 "${vm_version}")" > > + needed_version="$(ver_cut 1-2 "${needed_version}")" > > + ;; > > + esac > > > if [[ -z "${vm_version}" ]]; then > > debug-print "Could not get JDK version from DEPEND" > > -- > > 2.17.0