AFAICS PMS only bans use* functions in global scope. However, we should also ban has_version and best_version. Build and installation functions are not really meaningful in global scope, so we could ban them as well.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/proj/pms.git/commit/?id=153324136107543ef07b1378f08bce81199a9022 commit 153324136107543ef07b1378f08bce81199a9022 Author: Ulrich Müller <ulm@gentoo.org> AuthorDate: 2021-08-30 19:32:16 +0000 Commit: Ulrich Müller <ulm@gentoo.org> CommitDate: 2021-08-31 16:05:50 +0000 pkg-mgr-commands.tex: Clarify which commands are allowed in global scope For most commands this is already implied by the combination of the statements "When an ebuild is being sourced for metadata querying rather than for a build [...], no external command may be executed." in chapter 12 ("Available Commands") and "Except where otherwise noted, they may be internal [...] or external commands available in PATH; where this is not specified, ebuilds may not rely upon either behaviour." in section 12.3 ("Ebuild-specific Commands"). For output commands (einfo etc.) and debug commands (debug-print etc.) to be allowed in global scope, they must be implemented as shell functions. Specify this, which follows the implementation in all three package managers. Closes: https://bugs.gentoo.org/520528 Signed-off-by: Ulrich Müller <ulm@gentoo.org> pkg-mgr-commands.tex | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-)