In my Yocto mickledore image, I need python 3.12. Yocto mickledore has only python 3.11 included, so I have copied meta/recipes-devtools/python/* from openembedded layer scarthgap branch to my own mickledore layer. I have also configured PREFERRED_VERSION_python3 = "3.12.%" in my local.conf. But then I have got
WARNING: preferred version 3.12.% of python3 not available (for item python3-distutils)
WARNING: versions of python3 available: 3.11.5
WARNING: preferred version 3.12.% of python3 not available (for item python3-smtpd)
WARNING: versions of python3 available: 3.11.5
WARNING: preferred version 3.12.% of python3 not available (for item python3-distutils-windows)
WARNING: versions of python3 available: 3.11.5
...
ERROR: Multiple versions of python3 are due to be built (/home/***/yocto/***/recipes-python/packages-python3.12/python3_3.12.11.bb /home/***/yocto/layers/poky/meta/recipes-devtools/python/python3_3.11.5.bb). Only one version of a given PN should be built in any given build. You likely need to set PREFERRED_VERSION_python3 to select the correct version or don't depend on multiple versions.
I know distutils was removed from python 3.12, but some recipes probably still depends on it. Is here some way to investigate dependency chains and fix incompatible recipes?
grepandfindwill be your best friends. But I'd really consider updating to newer Yocto in your case. Normally that's better than being in some Dependency hellgrep -r distutils your-layer-dir/is easiest. I only get 50 results for poky, should be doable to check manually