Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 830273

Summary: python-any-r1 picks python version incompatible with meson/python-exec
Product: Gentoo Linux Reporter: Matthew Turnbull <sparky>
Component: EclassesAssignee: Python Gentoo Team <python>
Status: UNCONFIRMED ---    
Severity: normal CC: mgorny, sam, sparky
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: xkeyboard-config build log
emerge --info output

Description Matthew Turnbull 2021-12-30 07:15:14 UTC
Adding python3_10 to PYTHON_COMPAT in ebuilds using python-any-r1 can cause meson/python-exec to report warnings in some circumstances.

> python-exec: EPYTHON value invalid (python3.10).

I first encountered this updating some Cinnamon ebuilds using python-any-r1 and meson. I was also able to reproduce with other ebuilds such as x11-misc/xkeyboard-config. Though, interestingly, not every python-any-r1+meson ebuild exhibits this behavior.

Presumably this is because dev-lang/python-exec[-conf] and meson don't have python3_10 in PYTHON_TARGETS. I'm also not sure what would happen in a configuration where dev-lang/python-exec[-conf] have python3_10 but meson does not.

I'm not sure if this is the responsibility of the python eclasses, the meson eclass, or the ebuild itself.

Reproducible: Always
Comment 1 Matthew Turnbull 2021-12-30 07:18:12 UTC
Created attachment 760791 [details]
xkeyboard-config build log

> [ebuild   R    ] dev-lang/python-exec-conf-2.4.6:2::gentoo  PYTHON_TARGETS="python3_9 (-pypy3) -python3_8 (-python3_10)" 0 KiB
> [ebuild   R    ] dev-lang/python-exec-2.4.8:2::gentoo  USE="(native-symlinks) -test" PYTHON_TARGETS="(pypy3) (python3_8) (python3_9) (-python3_10)" 0 KiB
> [ebuild   R    ] dev-util/meson-0.59.4::gentoo  USE="(-test)" PYTHON_TARGETS="python3_9 -python3_8 (-python3_10)" 0 KiB
> [ebuild   R    ] x11-misc/xkeyboard-config-2.34::gentoo  0 KiB
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-12-30 07:33:53 UTC
Can you show an example of an ebuild which triggers it too? Thank you!
Comment 3 Matthew Turnbull 2021-12-30 07:48:08 UTC
I attached a build log for xkeyboard-config. Were you looking for something different?
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-12-30 07:50:54 UTC
(In reply to Matthew Turnbull from comment #3)
> I attached a build log for xkeyboard-config. Were you looking for something
> different?

sorry, I'd assumed it was with a new version in the PR you're working on!
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-12-30 09:24:17 UTC
I think the real cause is that python3_10 flag is masked on dev-lang/python-exec.  What's the value of ACCEPT_KEYWORDS?  Please attach or paste your 'emerge --info'.
Comment 6 Matthew Turnbull 2021-12-30 16:32:00 UTC
Created attachment 760863 [details]
emerge  --info output
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-12-30 21:10:05 UTC
Well, in my opinion the biggest problem here is that I've neglected to un-stable-mask python3_10 on python-exec.  I've removed the stable masks now, so on next @world upgrade python-exec should be built with all flags and the error should disappear.

Not sure if there's anything else we can do about it.
Comment 8 Matthew Turnbull 2021-12-31 04:53:06 UTC
I rebuilt everything and the EPYTHON warning is no longer present. So I'll consider this fixed :)

I wonder if this can be avoided in the future if python-any-r1 could somehow ignore any masked PYTHON_TARGETS. Maybe just turn the python-exec warning into a verbose debug - or only print it if no valid interpreter is found.
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-12-31 08:05:17 UTC
Well, normally this shouldn't ever happen because python-r1/python-single-r1 both enforce the respective USE flags on python-exec.  Perhaps python-any-r1 should also dep on it.