diff options
author | Zac Medico <zmedico@gentoo.org> | 2012-09-27 10:38:37 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2012-09-27 10:38:37 -0700 |
commit | 4c1145787195dcd1cc9a459d4cada72155d3ad81 (patch) | |
tree | 659579a7abbb9d53f37b9670605f922e1cd334e1 | |
parent | a6cfb7dc96cf015d3867929ab0dece49fb69ded0 (diff) | |
download | portage-4c1145787195dcd1cc9a459d4cada72155d3ad81.tar.gz portage-4c1145787195dcd1cc9a459d4cada72155d3ad81.tar.bz2 portage-4c1145787195dcd1cc9a459d4cada72155d3ad81.zip |
ebuild.sh: EAPI conditional usex dummy
This probably makes no difference in practice, since it only affects
the "depend" phase. Note that we're allowed to use EAPI conditionals
here, since we parse the EAPI on the python side and pass it to bash.
-rwxr-xr-x | bin/ebuild.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh index aa3dcdd28..1b15bd06a 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -33,7 +33,11 @@ else done # These dummy functions return false in non-strict EAPIs, in order to ensure that # `use multislot` is false for the "depend" phase. - for x in use useq usev usex ; do + funcs="use useq usev" + if ___eapi_has_usex; then + funcs+=" usex" + fi + for x in ${funcs} ; do eval "${x}() { if ___eapi_disallows_helpers_in_global_scope; then die \"\${FUNCNAME}() calls are not allowed in global scope\" @@ -47,7 +51,7 @@ else for x in best_version has_version portageq ; do eval "${x}() { die \"\${FUNCNAME}() calls are not allowed in global scope\"; }" done - unset x + unset funcs x fi # Don't use sandbox's BASH_ENV for new shells because it does |