Quite a while ago, bug 520528 was filed, asking for a ban of
has_version, best_version, and possibly other commands in global scope.

Since most ebuild commands cannot be used in global scope anyway,
I think that a positive list of commands _allowed_ there would make more
sense; all other commands would be banned.

Discussing this in #gentoo-pms, we have identified the following
commands (from PMS section 12.3 [1]) that would be allowed:

- einfo, einfon, elog, ewarn, eqawarn, eerror, ebegin, eend
- has, hasv, hasq
- ver_cut, ver_rs, ver_test
- inherit, EXPORT_FUNCTIONS
- get_libdir
- debug-print, debug-print-function, debug-print-section
- die (this is a special case: calling die in global scope is an error)

Are there any others that I've missed, i.e. that are legitimately used
in global scope of ebuilds and eclasses?

Ulrich

[1] https://projects.gentoo.org/pms/8/pms.html#x1-12000012.3

Attachment: signature.asc
Description: PGP signature

Reply via email to