[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    [gentoo-dev] What commands are allowed in global scope of an ebuild?
From:       Ulrich Mueller <ulm () gentoo ! org>
Date:       2021-08-30 16:05:46
Message-ID: uzgsyudd1 () gentoo ! org
[Download RAW message or body]


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

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic