commit: e28b1e4e0053c1f2827ba62eaf2da3b7b8b824de
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Fri Aug 9 10:36:58 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Aug 11 10:11:02 2024 +0000
URL:
https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=e28b1e4e
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 <AT> plushava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>
test-functions | 8 ++++++++
1 file changed, 8 insertions(+)
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"