summaryrefslogtreecommitdiff
path: root/eclass/preserve-libs.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-04-06 22:33:41 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-04-06 22:33:41 +0100
commite68d405c5d712af4387159df07e226217bdda049 (patch)
tree009ab0f3d427f0813e62930d71802cb054c07e30 /eclass/preserve-libs.eclass
parent401101f9c8077911929d3f2b60a37098460a5d89 (diff)
gentoo resync : 06.04.2022
Diffstat (limited to 'eclass/preserve-libs.eclass')
-rw-r--r--eclass/preserve-libs.eclass16
1 files changed, 6 insertions, 10 deletions
diff --git a/eclass/preserve-libs.eclass b/eclass/preserve-libs.eclass
index da13e7943add..df07e511c130 100644
--- a/eclass/preserve-libs.eclass
+++ b/eclass/preserve-libs.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: preserve-libs.eclass
@@ -7,8 +7,8 @@
# @SUPPORTED_EAPIS: 5 6 7
# @BLURB: preserve libraries after SONAME changes
-case ${EAPI:-0} in
- [567]) ;;
+case ${EAPI} in
+ 5|6|7) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -34,15 +34,13 @@ preserve_old_lib() {
# let portage worry about it
has preserve-libs ${FEATURES} && return 0
- has "${EAPI:-0}" 0 1 2 && local ED=${D} EROOT=${ROOT}
-
local lib dir
for lib in "$@" ; do
[[ -e ${EROOT}/${lib} ]] || continue
dir=${lib%/*}
- dodir ${dir} || die "dodir ${dir} failed"
- cp "${EROOT}"/${lib} "${ED}"/${lib} || die "cp ${lib} failed"
- touch "${ED}"/${lib}
+ dodir "${dir}"
+ cp "${EROOT}/${lib}" "${ED}/${lib}" || die "cp ${lib} failed"
+ touch "${ED}/${lib}"
done
}
@@ -59,8 +57,6 @@ preserve_old_lib_notify() {
# let portage worry about it
has preserve-libs ${FEATURES} && return 0
- has "${EAPI:-0}" 0 1 2 && local EROOT=${ROOT}
-
local lib notice=0
for lib in "$@" ; do
[[ -e ${EROOT}/${lib} ]] || continue