diff options
author | Ulrich Müller <ulm@gentoo.org> | 2012-09-28 15:18:04 +0000 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2012-09-28 15:18:04 +0000 |
commit | 5595ea7b233a2638291c34b87bde7fe39896d666 (patch) | |
tree | 97b023a4295aa6e729b396d2ebb216adeee1c4f0 /eclass | |
parent | fixed changelog message (diff) | |
download | gentoo-2-5595ea7b233a2638291c34b87bde7fe39896d666.tar.gz gentoo-2-5595ea7b233a2638291c34b87bde7fe39896d666.tar.bz2 gentoo-2-5595ea7b233a2638291c34b87bde7fe39896d666.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/ChangeLog | 6 | ||||
-rw-r--r-- | eclass/eutils.eclass | 4 |
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 |