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