1 |
Inline the remaining two uses of the function. This shortens the code, |
2 |
and also allows to declare the variables as local. |
3 |
--- |
4 |
eclass/eutils.eclass | 12 ++---------- |
5 |
1 file changed, 2 insertions(+), 10 deletions(-) |
6 |
|
7 |
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass |
8 |
index 91d329e99c9e..63f73db290f4 100644 |
9 |
--- a/eclass/eutils.eclass |
10 |
+++ b/eclass/eutils.eclass |
11 |
@@ -164,14 +164,6 @@ strip-linguas() { |
12 |
export LINGUAS=${newls:1} |
13 |
} |
14 |
|
15 |
-# @FUNCTION: _eutils_eprefix_init |
16 |
-# @INTERNAL |
17 |
-# @DESCRIPTION: |
18 |
-# Initialized prefix variables for EAPI<3. |
19 |
-_eutils_eprefix_init() { |
20 |
- has "${EAPI:-0}" 0 1 2 && : ${ED:=${D}} ${EPREFIX:=} ${EROOT:=${ROOT}} |
21 |
-} |
22 |
- |
23 |
# @FUNCTION: built_with_use |
24 |
# @USAGE: [--hidden] [--missing <action>] [-a|-o] <DEPEND ATOM> <List of USE flags> |
25 |
# @DESCRIPTION: |
26 |
@@ -194,7 +186,6 @@ _eutils_eprefix_init() { |
27 |
# Remember that this function isn't terribly intelligent so order of optional |
28 |
# flags matter. |
29 |
built_with_use() { |
30 |
- _eutils_eprefix_init |
31 |
local hidden="no" |
32 |
if [[ $1 == "--hidden" ]] ; then |
33 |
hidden="yes" |
34 |
@@ -218,6 +209,7 @@ built_with_use() { |
35 |
[[ -z ${PKG} ]] && die "Unable to resolve $1 to an installed package" |
36 |
shift |
37 |
|
38 |
+ has "${EAPI:-0}" 0 1 2 && local EROOT=${ROOT} |
39 |
local USEFILE=${EROOT}/var/db/pkg/${PKG}/USE |
40 |
local IUSEFILE=${EROOT}/var/db/pkg/${PKG}/IUSE |
41 |
|
42 |
@@ -272,9 +264,9 @@ built_with_use() { |
43 |
# first optionally setting LD_LIBRARY_PATH to the colon-delimited |
44 |
# libpaths followed by optionally changing directory to chdir. |
45 |
make_wrapper() { |
46 |
- _eutils_eprefix_init |
47 |
local wrapper=$1 bin=$2 chdir=$3 libdir=$4 path=$5 |
48 |
local tmpwrapper=$(emktemp) |
49 |
+ has "${EAPI:-0}" 0 1 2 && local EPREFIX="" |
50 |
|
51 |
( |
52 |
echo '#!/bin/sh' |
53 |
-- |
54 |
2.15.1 |