You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there an existing such new check request for this?
I have searched the existing issues
Explain
We should check for people using Python target flags directly, rather than the abstraction provided by eclasses. Stuff like that is going to suddenly explode when we disable old targets, especially direct use python_targets* calls, since these won't be caught by pkgcheck.
Python target flags must not be directly queried, use X instead.
Documentation
The Python eclasses provide abstraction over querying target flags, that facilitates transparently disabling targets when they become obsolete. Directly querying PYTHON_TARGETS or PYTHON_SINGLE_TARGET flags does not account for that properly, and will cause the ebuilds to break when old targets are disabled in the eclass, and in some cases the breakage won't be caught by pkgcheck.
The alternatives are [put them for X in message]:
python_foreach_impl for querying enabled PYTHON_TARGETS
${EPYTHON} for checking the currently selected PYTHON_SINGLE_TARGET
python_gen_cond_dep to generate conditional dependencies
Result level
warning
The text was updated successfully, but these errors were encountered:
Is there an existing such new check request for this?
Explain
We should check for people using Python target flags directly, rather than the abstraction provided by eclasses. Stuff like that is going to suddenly explode when we disable old targets, especially direct
use python_targets*
calls, since these won't be caught by pkgcheck.Examples
https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-lang/python-exec/python-exec-2.4.10.ebuild?id=7f5d4c75a6e10b7ec7d7f371940f342c10b5a7b1#n42 (technically, this is a false positive but I think it should be reported)
https://gitweb.gentoo.org/repo/gentoo.git/tree/media-gfx/blender/blender-4.2.1.ebuild?id=7f5d4c75a6e10b7ec7d7f371940f342c10b5a7b1#n584
https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-python/QtPy/QtPy-2.4.1-r1.ebuild?id=7f5d4c75a6e10b7ec7d7f371940f342c10b5a7b1#n32
https://gitweb.gentoo.org/repo/gentoo.git/tree/media-gfx/freecad/freecad-0.21.2-r3.ebuild?id=7f5d4c75a6e10b7ec7d7f371940f342c10b5a7b1#n162
https://gitweb.gentoo.org/repo/gentoo.git/tree/x11-wm/xpra/xpra-4.4.6-r2.ebuild?id=7f5d4c75a6e10b7ec7d7f371940f342c10b5a7b1#n26
Output message
Python target flags must not be directly queried, use X instead.
Documentation
The Python eclasses provide abstraction over querying target flags, that facilitates transparently disabling targets when they become obsolete. Directly querying
PYTHON_TARGETS
orPYTHON_SINGLE_TARGET
flags does not account for that properly, and will cause the ebuilds to break when old targets are disabled in the eclass, and in some cases the breakage won't be caught by pkgcheck.The alternatives are [put them for X in message]:
python_foreach_impl
for querying enabledPYTHON_TARGETS
${EPYTHON}
for checking the currently selectedPYTHON_SINGLE_TARGET
python_gen_cond_dep
to generate conditional dependenciesResult level
warning
The text was updated successfully, but these errors were encountered: