Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: bin/
Date: Thu, 27 Sep 2012 17:39:12
Message-Id: 1348767517.4c1145787195dcd1cc9a459d4cada72155d3ad81.zmedico@gentoo
1 commit: 4c1145787195dcd1cc9a459d4cada72155d3ad81
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 27 17:38:37 2012 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 27 17:38:37 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=4c114578
7
8 ebuild.sh: EAPI conditional usex dummy
9
10 This probably makes no difference in practice, since it only affects
11 the "depend" phase. Note that we're allowed to use EAPI conditionals
12 here, since we parse the EAPI on the python side and pass it to bash.
13
14 ---
15 bin/ebuild.sh | 8 ++++++--
16 1 files changed, 6 insertions(+), 2 deletions(-)
17
18 diff --git a/bin/ebuild.sh b/bin/ebuild.sh
19 index aa3dcdd..1b15bd0 100755
20 --- a/bin/ebuild.sh
21 +++ b/bin/ebuild.sh
22 @@ -33,7 +33,11 @@ else
23 done
24 # These dummy functions return false in non-strict EAPIs, in order to ensure that
25 # `use multislot` is false for the "depend" phase.
26 - for x in use useq usev usex ; do
27 + funcs="use useq usev"
28 + if ___eapi_has_usex; then
29 + funcs+=" usex"
30 + fi
31 + for x in ${funcs} ; do
32 eval "${x}() {
33 if ___eapi_disallows_helpers_in_global_scope; then
34 die \"\${FUNCNAME}() calls are not allowed in global scope\"
35 @@ -47,7 +51,7 @@ else
36 for x in best_version has_version portageq ; do
37 eval "${x}() { die \"\${FUNCNAME}() calls are not allowed in global scope\"; }"
38 done
39 - unset x
40 + unset funcs x
41 fi
42
43 # Don't use sandbox's BASH_ENV for new shells because it does