• [gentoo-dev] What commands are allowed in global scope of an ebuild?

    From Ulrich Mueller@21:1/5 to All on Mon Aug 30 18:10:02 2021
    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

    -----BEGIN PGP SIGNATURE-----

    iQFDBAEBCAAtFiEEtDnZ1O9xIP68rzDbUYgzUIhBXi4FAmEtAdoPHHVsbUBnZW50 b28ub3JnAAoJEFGIM1CIQV4uU5YH+wVRuEoGvFVaB4Xjvoq/7eigIZZMFo7BnLLV ixMaceC18APTiUBuqcgzOYmuD4t/44BGxXjEMDaqi1PGJrrT1cl33sVcS9KzuF2T rQqBvspVZ2Bn68xIJP3UcG4VkpdWb88MQPnH7qJUbcwBX0ayWgFqbJfwce6HrL+j OyB6ReF4VX+nBL7FkYoiQzxBP0fempYVxYd3iNxsxyy9U7gmoMkrz5R6oiZbkkSV bOXWnzeWHR2HbmB9/EpyuJnatLkbbvFoN7PvtQ7Q2WKDUu81elxJZ7tit9pFklrZ D+5nEW0+KBFJyaFSaovqXCfOQow6mTdXJui/I8tCqBWA7+X2EJI=
    =LqvA
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)