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 C59D1138334 for ; Fri, 24 Aug 2018 17:29:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 92CCFE0960; Fri, 24 Aug 2018 17:29:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 44F17E0878 for ; Fri, 24 Aug 2018 17:29:12 +0000 (UTC) Received: from akame.wilkesbarre.scent-team.local (unknown [50.120.197.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: grknight) by smtp.gentoo.org (Postfix) with ESMTPSA id 4E03C335C32 for ; Fri, 24 Aug 2018 17:29:11 +0000 (UTC) From: Brian Evans To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] [PATCH] eclass: db-use - Update to eapi7-ver Date: Fri, 24 Aug 2018 13:28:59 -0400 Message-Id: <20180824172859.31231-1-grknight@gentoo.org> X-Mailer: git-send-email 2.18.0 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 X-Archives-Salt: 1c4cb8a7-7e9e-4e42-ae32-fd5d6c825921 X-Archives-Hash: aaf3835c2b3873b15c0f7761d1bdd830 This is a very simple eclass which only calls these functions from eclasses: ver_cut (EAPI 0-6) get_libdir (EAPI 0-5) get_libname (ALL EAPI) I see no little reason to place die statements for unknown EAPIs. Just changing the eclasses to better suit the latest EAPI should be OK. Signed-off-by: Brian Evans --- eclass/db-use.eclass | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/eclass/db-use.eclass b/eclass/db-use.eclass index 35f11df034a..83ae94799ca 100644 --- a/eclass/db-use.eclass +++ b/eclass/db-use.eclass @@ -1,10 +1,14 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # This is a common location for functions that aid the use of sys-libs/db # # Bugs: maintainer-needed@gentoo.org -inherit versionator multilib +# multilib is used for get_libname in all EAPI +case "${EAPI:-0}" in + 0|1|2|3|4|5|6) inherit eapi7-ver multilib ;; + *) inherit multilib ;; +esac #Convert a version to a db slot db_ver_to_slot() { @@ -38,7 +42,7 @@ db_findver() { fi PKG="$(best_version $1)" - VER="$(get_version_component_range 1-2 "${PKG/*db-/}")" + VER="$(ver_cut 1-2 "${PKG/*db-/}")" if [ -d "${EPREFIX}"/usr/include/db$(db_ver_to_slot "$VER") ]; then #einfo "Found db version ${VER}" >&2 echo -n "$VER" -- 2.18.0