Gentoo Archives: gentoo-dev

From: David Seifert <soap@g.o>
To: gentoo-dev@l.g.o
Cc: David Seifert <soap@g.o>
Subject: [gentoo-dev] [PATCH 02/41] alternatives.eclass: drop EAPI 5, 6 support
Date: Sun, 25 Dec 2022 22:16:30
Message-Id: 20221225221552.8023-2-soap@gentoo.org
In Reply to: [gentoo-dev] [PATCH 01/41] ada.eclass: drop EAPI 6 support by David Seifert
1 Signed-off-by: David Seifert <soap@g.o>
2 ---
3 eclass/alternatives.eclass | 15 +++++++--------
4 1 file changed, 7 insertions(+), 8 deletions(-)
5
6 diff --git a/eclass/alternatives.eclass b/eclass/alternatives.eclass
7 index 155a2457bbd..2489fc67359 100644
8 --- a/eclass/alternatives.eclass
9 +++ b/eclass/alternatives.eclass
10 @@ -1,4 +1,4 @@
11 -# Copyright 1999-2021 Gentoo Authors
12 +# Copyright 1999-2022 Gentoo Authors
13 # Distributed under the terms of the GNU General Public License v2
14
15 # @ECLASS: alternatives.eclass
16 @@ -6,7 +6,7 @@
17 # maintainer-needed@g.o
18 # @AUTHOR:
19 # Alastair Tse <liquidx@g.o> (03 Oct 2003)
20 -# @SUPPORTED_EAPIS: 5 6 7
21 +# @SUPPORTED_EAPIS: 7
22 # @BLURB: Creates symlink to the latest version of multiple slotted packages.
23 # @DESCRIPTION:
24 # When a package is SLOT'ed, very often we need to have a symlink to the
25 @@ -42,12 +42,10 @@
26 # consider using this unless you are want to do something special.
27
28 case ${EAPI} in
29 - [5-7]) ;;
30 - *) die "EAPI=${EAPI:-0} is not supported" ;;
31 + 7) ;;
32 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
33 esac
34
35 -EXPORT_FUNCTIONS pkg_postinst pkg_postrm
36 -
37 if [[ -z ${_ALTERNATIVES_ECLASS} ]]; then
38 _ALTERNATIVES_ECLASS=1
39
40 @@ -95,8 +93,7 @@ alternatives_makesym() {
41 # usage: alternatives_makesym <resulting symlink> [alternative targets..]
42 # make sure it is in the prefix, allow it already to be in the prefix
43 SYMLINK=${EPREFIX}/${1#${EPREFIX}}
44 - # this trick removes the trailing / from ${ROOT}
45 - pref=${ROOT%/}
46 + pref=${ROOT}
47 shift
48 ALTERNATIVES=$@
49
50 @@ -154,3 +151,5 @@ alternatives_pkg_postrm() {
51 }
52
53 fi
54 +
55 +EXPORT_FUNCTIONS pkg_postinst pkg_postrm
56 --
57 2.39.0