Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH v2 28/29] python-utils-r1.eclass: Remove _python_ln_rel
Date: Sun, 20 Jun 2021 13:24:56
Message-Id: 20210620132426.794041-28-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 00/28] python-r1 suite EAPI 8 support/cleanup by "Michał Górny"
1 Signed-off-by: Michał Górny <mgorny@g.o>
2 ---
3 eclass/python-utils-r1.eclass | 40 -----------------------------------
4 1 file changed, 40 deletions(-)
5
6 diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
7 index 9c8b683a337f..d43311762f9f 100644
8 --- a/eclass/python-utils-r1.eclass
9 +++ b/eclass/python-utils-r1.eclass
10 @@ -549,46 +549,6 @@ python_get_scriptdir() {
11 echo "${PYTHON_SCRIPTDIR}"
12 }
13
14 -# @FUNCTION: _python_ln_rel
15 -# @USAGE: <from> <to>
16 -# @INTERNAL
17 -# @DESCRIPTION:
18 -# Create a relative symlink.
19 -_python_ln_rel() {
20 - debug-print-function ${FUNCNAME} "${@}"
21 -
22 - local target=${1}
23 - local symname=${2}
24 -
25 - local tgpath=${target%/*}/
26 - local sympath=${symname%/*}/
27 - local rel_target=
28 -
29 - while [[ ${sympath} ]]; do
30 - local tgseg= symseg=
31 -
32 - while [[ ! ${tgseg} && ${tgpath} ]]; do
33 - tgseg=${tgpath%%/*}
34 - tgpath=${tgpath#${tgseg}/}
35 - done
36 -
37 - while [[ ! ${symseg} && ${sympath} ]]; do
38 - symseg=${sympath%%/*}
39 - sympath=${sympath#${symseg}/}
40 - done
41 -
42 - if [[ ${tgseg} != ${symseg} ]]; then
43 - rel_target=../${rel_target}${tgseg:+${tgseg}/}
44 - fi
45 - done
46 - rel_target+=${tgpath}${target##*/}
47 -
48 - debug-print "${FUNCNAME}: ${symname} -> ${target}"
49 - debug-print "${FUNCNAME}: rel_target = ${rel_target}"
50 -
51 - ln -fs "${rel_target}" "${symname}"
52 -}
53 -
54 # @FUNCTION: python_optimize
55 # @USAGE: [<directory>...]
56 # @DESCRIPTION:
57 --
58 2.32.0