Gentoo Archives: gentoo-dev

From: Mart Raudsepp <leio@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] eclass: db-use - Update to eapi7-ver
Date: Fri, 24 Aug 2018 17:39:08
Message-Id: 1535132334.6451.2.camel@gentoo.org
In Reply to: [gentoo-dev] [PATCH] eclass: db-use - Update to eapi7-ver by Brian Evans
1 Ühel kenal päeval, R, 24.08.2018 kell 13:28, kirjutas Brian Evans:
2 > This is a very simple eclass which only calls these functions from
3 > eclasses:
4 > ver_cut (EAPI 0-6)
5 > get_libdir (EAPI 0-5)
6 > get_libname (ALL EAPI)
7 >
8 > I see no little reason to place die statements for unknown EAPIs.
9 > Just changing the eclasses to better suit the latest EAPI should be
10 > OK.
11
12 I'm unsure about not dying on unknown EAPI, but the rest looks good, as
13 at least in main tree everything inheriting db-use and using
14 versionator functions themselves, do properly inherit from versionator
15 themselves, instead of relying on it via db-use.eclass indirectly.
16
17 Not dying on unknown EAPI is not a change in status quo, so I don't
18 mind it here and for future EAPI-8 I hope we look through the non-
19 limited eclasses before its introduction.
20
21 Mart
22
23 > Signed-off-by: Brian Evans <grknight@g.o>
24 > ---
25 > eclass/db-use.eclass | 10 +++++++---
26 > 1 file changed, 7 insertions(+), 3 deletions(-)
27 >
28 > diff --git a/eclass/db-use.eclass b/eclass/db-use.eclass
29 > index 35f11df034a..83ae94799ca 100644
30 > --- a/eclass/db-use.eclass
31 > +++ b/eclass/db-use.eclass
32 > @@ -1,10 +1,14 @@
33 > -# Copyright 1999-2014 Gentoo Foundation
34 > +# Copyright 1999-2018 Gentoo Foundation
35 > # Distributed under the terms of the GNU General Public License v2
36 > # This is a common location for functions that aid the use of sys-
37 > libs/db
38 > #
39 > # Bugs: maintainer-needed@g.o
40 >
41 > -inherit versionator multilib
42 > +# multilib is used for get_libname in all EAPI
43 > +case "${EAPI:-0}" in
44 > + 0|1|2|3|4|5|6) inherit eapi7-ver multilib ;;
45 > + *) inherit multilib ;;
46 > +esac
47 >
48 > #Convert a version to a db slot
49 > db_ver_to_slot() {
50 > @@ -38,7 +42,7 @@ db_findver() {
51 > fi
52 >
53 > PKG="$(best_version $1)"
54 > - VER="$(get_version_component_range 1-2 "${PKG/*db-/}")"
55 > + VER="$(ver_cut 1-2 "${PKG/*db-/}")"
56 > if [ -d "${EPREFIX}"/usr/include/db$(db_ver_to_slot "$VER")
57 > ]; then
58 > #einfo "Found db version ${VER}" >&2
59 > echo -n "$VER"

Attachments

File name MIME type
signature.asc application/pgp-signature