summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2018-01-03 17:15:09 +0100
committerUlrich Müller <ulm@gentoo.org>2018-01-09 11:21:20 +0100
commitf4c204519ee20599e06a88df8dd1a8da7d67a364 (patch)
tree8560fe347322bad2e75562b32cdf953e3bb009d9 /eclass
parentpreserve-libs.eclass: Split off preserve_old_lib from eutils. (diff)
downloadgentoo-f4c204519ee20599e06a88df8dd1a8da7d67a364.tar.gz
gentoo-f4c204519ee20599e06a88df8dd1a8da7d67a364.tar.bz2
gentoo-f4c204519ee20599e06a88df8dd1a8da7d67a364.zip
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.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/eutils.eclass12
1 files changed, 2 insertions, 10 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass
index 91d329e99c9e..63f73db290f4 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'