Gentoo Archives: gentoo-dev

From: Brian Evans <grknight@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] [PATCH] eclass: db-use - Update to eapi7-ver
Date: Fri, 24 Aug 2018 17:29:16
Message-Id: 20180824172859.31231-1-grknight@gentoo.org
1 This is a very simple eclass which only calls these functions from eclasses:
2 ver_cut (EAPI 0-6)
3 get_libdir (EAPI 0-5)
4 get_libname (ALL EAPI)
5
6 I see no little reason to place die statements for unknown EAPIs.
7 Just changing the eclasses to better suit the latest EAPI should be OK.
8
9 Signed-off-by: Brian Evans <grknight@g.o>
10 ---
11 eclass/db-use.eclass | 10 +++++++---
12 1 file changed, 7 insertions(+), 3 deletions(-)
13
14 diff --git a/eclass/db-use.eclass b/eclass/db-use.eclass
15 index 35f11df034a..83ae94799ca 100644
16 --- a/eclass/db-use.eclass
17 +++ b/eclass/db-use.eclass
18 @@ -1,10 +1,14 @@
19 -# Copyright 1999-2014 Gentoo Foundation
20 +# Copyright 1999-2018 Gentoo Foundation
21 # Distributed under the terms of the GNU General Public License v2
22 # This is a common location for functions that aid the use of sys-libs/db
23 #
24 # Bugs: maintainer-needed@g.o
25
26 -inherit versionator multilib
27 +# multilib is used for get_libname in all EAPI
28 +case "${EAPI:-0}" in
29 + 0|1|2|3|4|5|6) inherit eapi7-ver multilib ;;
30 + *) inherit multilib ;;
31 +esac
32
33 #Convert a version to a db slot
34 db_ver_to_slot() {
35 @@ -38,7 +42,7 @@ db_findver() {
36 fi
37
38 PKG="$(best_version $1)"
39 - VER="$(get_version_component_range 1-2 "${PKG/*db-/}")"
40 + VER="$(ver_cut 1-2 "${PKG/*db-/}")"
41 if [ -d "${EPREFIX}"/usr/include/db$(db_ver_to_slot "$VER") ]; then
42 #einfo "Found db version ${VER}" >&2
43 echo -n "$VER"
44 --
45 2.18.0

Replies