Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Tue, 05 Apr 2022 17:21:57
Message-Id: 1649179204.d6457c84c327b454d2da33a7e76e75258a906ba9.ulm@gentoo
1 commit: d6457c84c327b454d2da33a7e76e75258a906ba9
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 2 08:34:17 2022 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Tue Apr 5 17:20:04 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d6457c84
7
8 preserve-libs.eclass: Remove conditionals for EAPIs 0, 1, and 2
9
10 Drop an unnecessary die statement. Adjust some quotation marks.
11
12 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
13
14 eclass/preserve-libs.eclass | 16 ++++++----------
15 1 file changed, 6 insertions(+), 10 deletions(-)
16
17 diff --git a/eclass/preserve-libs.eclass b/eclass/preserve-libs.eclass
18 index da13e7943add..df07e511c130 100644
19 --- a/eclass/preserve-libs.eclass
20 +++ b/eclass/preserve-libs.eclass
21 @@ -1,4 +1,4 @@
22 -# Copyright 1999-2021 Gentoo Authors
23 +# Copyright 1999-2022 Gentoo Authors
24 # Distributed under the terms of the GNU General Public License v2
25
26 # @ECLASS: preserve-libs.eclass
27 @@ -7,8 +7,8 @@
28 # @SUPPORTED_EAPIS: 5 6 7
29 # @BLURB: preserve libraries after SONAME changes
30
31 -case ${EAPI:-0} in
32 - [567]) ;;
33 +case ${EAPI} in
34 + 5|6|7) ;;
35 *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
36 esac
37
38 @@ -34,15 +34,13 @@ preserve_old_lib() {
39 # let portage worry about it
40 has preserve-libs ${FEATURES} && return 0
41
42 - has "${EAPI:-0}" 0 1 2 && local ED=${D} EROOT=${ROOT}
43 -
44 local lib dir
45 for lib in "$@" ; do
46 [[ -e ${EROOT}/${lib} ]] || continue
47 dir=${lib%/*}
48 - dodir ${dir} || die "dodir ${dir} failed"
49 - cp "${EROOT}"/${lib} "${ED}"/${lib} || die "cp ${lib} failed"
50 - touch "${ED}"/${lib}
51 + dodir "${dir}"
52 + cp "${EROOT}/${lib}" "${ED}/${lib}" || die "cp ${lib} failed"
53 + touch "${ED}/${lib}"
54 done
55 }
56
57 @@ -59,8 +57,6 @@ preserve_old_lib_notify() {
58 # let portage worry about it
59 has preserve-libs ${FEATURES} && return 0
60
61 - has "${EAPI:-0}" 0 1 2 && local EROOT=${ROOT}
62 -
63 local lib notice=0
64 for lib in "$@" ; do
65 [[ -e ${EROOT}/${lib} ]] || continue