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