diff options
author | Kerin Millar <kfm@plushkava.net> | 2024-08-09 11:36:58 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-08-11 11:11:02 +0100 |
commit | e28b1e4e0053c1f2827ba62eaf2da3b7b8b824de (patch) | |
tree | 960d612fb30dfd61dce363f98b34483e3af0f836 | |
parent | test-functions: account for the potential absence of test(1) as a builtin (diff) | |
download | gentoo-functions-e28b1e4e0053c1f2827ba62eaf2da3b7b8b824de.tar.gz gentoo-functions-e28b1e4e0053c1f2827ba62eaf2da3b7b8b824de.tar.bz2 gentoo-functions-e28b1e4e0053c1f2827ba62eaf2da3b7b8b824de.zip |
test-functions: comment as to the implications of test_local() failing
In particular, comment as to why the test can be expected to fail for
ksh93 and - in some cases - yash.
Signed-off-by: Kerin Millar <kfm@plushava.net>
Signed-off-by: Sam James <sam@gentoo.org>
-rwxr-xr-x | test-functions | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test-functions b/test-functions index 7c848c1..0ab203b 100755 --- a/test-functions +++ b/test-functions @@ -1180,6 +1180,14 @@ if [ "${PORTAGE_BIN_PATH}" ] && [ "${S}" ]; then fi if ! test_local; then + # Currently, this test is known to fail for ksh93 and yash. As regards + # the former, the commonly implemented behaviour of "local" can be + # approximated with "typeset". However, to use typeset in this way + # requires the use of the function f { ...; } syntax instead of the + # POSIX-compatible f() compound-command syntax. Further, ksh93 + # implements static scoping. As regards the latter, yash is rather + # stringent and simply disables its local builtin if in its posix mode. + # Running yash as "sh" would be one way of activating said mode. rc=1 elif ! GENFUN_MODULES="portage rc" . ./functions.sh; then bailout "Couldn't source ./functions.sh" |