Gentoo Archives: gentoo-commits

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