summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2012-09-28 15:18:04 +0000
committerUlrich Müller <ulm@gentoo.org>2012-09-28 15:18:04 +0000
commit3cd578f81da4b02ca0590b74943365c521e2ebbd (patch)
tree19ba2ddbd1361a3bd42420bd2bd4b056f4e566ce /eclass
parentfixed changelog message (diff)
downloadhistorical-3cd578f81da4b02ca0590b74943365c521e2ebbd.tar.gz
historical-3cd578f81da4b02ca0590b74943365c521e2ebbd.tar.bz2
historical-3cd578f81da4b02ca0590b74943365c521e2ebbd.zip
Test for the EAPI explicitly, because it isn't required that package managers implement usex as a shell function.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog6
-rw-r--r--eclass/eutils.eclass4
2 files changed, 7 insertions, 3 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index c3e3be6a8ce0..dd8f30a861e5 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for eclass directory
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.419 2012/09/28 15:08:17 axs Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.420 2012/09/28 15:18:04 ulm Exp $
+
+ 28 Sep 2012; Ulrich Müller <ulm@gentoo.org> eutils.eclass:
+ Test for the EAPI explicitly, because it isn't guaranteed that package
+ managers implement usex as a shell function.
28 Sep 2012; Ian Stakenvicius <axs@gentoo.org> toolchain-funcs.eclass:
reverted fatal error from unset KV and made it a warning only shown when
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass
index ff06d254f288..16570765eb90 100644
--- a/eclass/eutils.eclass
+++ b/eclass/eutils.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.404 2012/09/27 17:12:34 axs Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.405 2012/09/28 15:18:04 ulm Exp $
# @ECLASS: eutils.eclass
# @MAINTAINER:
@@ -1375,7 +1375,7 @@ use_if_iuse() {
# and use the package manager implementation when available (i.e. EAPI >= 5).
# If USE flag is set, echo [true output][true suffix] (defaults to "yes"),
# otherwise echo [false output][false suffix] (defaults to "no").
-if ! declare -F usex >/dev/null ; then
+if has "${EAPI:-0}" 0 1 2 3 4; then
usex() { use "$1" && echo "${2-yes}$4" || echo "${3-no}$5" ; } #382963
fi