Using the crossdev emerge wrapper, the install phase of cloud-init fails with this error: ``` >>> Install app-emulation/cloud-init-21.2 into /usr/mipsel-unknown-linux-gnu/tmp/portage/app-emulation/cloud-init-21.2/image * python3_9: running distutils-r1_run_phase python_install python3.9 setup.py install --skip-build --root=/usr/mipsel-unknown-linux-gnu/tmp/portage/app-emulation/cloud-init-21.2/image/_python3.9 --init-system=sysvinit_openrc,systemd --distro gentoo Traceback (most recent call last): File "/usr/mipsel-unknown-linux-gnu/tmp/portage/app-emulation/cloud-init-21.2/work/cloud-init-21.2/./tools/render-cloudcfg", line 15, in <module> from cloudinit import templater File "/usr/mipsel-unknown-linux-gnu/tmp/portage/app-emulation/cloud-init-21.2/work/cloud-init-21.2/cloudinit/templater.py", line 33, in <module> from cloudinit import util File "/usr/mipsel-unknown-linux-gnu/tmp/portage/app-emulation/cloud-init-21.2/work/cloud-init-21.2/cloudinit/util.py", line 42, in <module> from cloudinit import ( File "/usr/mipsel-unknown-linux-gnu/tmp/portage/app-emulation/cloud-init-21.2/work/cloud-init-21.2/cloudinit/safeyaml.py", line 7, in <module> import yaml ModuleNotFoundError: No module named 'yaml' ``` dev-python/pyyaml is installed in the sysroot, but not on the build system. If I edit the cloud-init ebuild file and add dev-python/pyyaml to BDEPEND, then it get's pulled in correctly and cloud-init is merged successfully. ``` $ sudo mipsel-unknown-linux-gnu-emerge -pv cloud-init These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild N ] dev-python/pyyaml-5.4.1::gentoo USE="libyaml -examples -test" PYTHON_TARGETS="python3_8 python3_9 (-pypy3) (-python3_10)" 0 KiB [ebuild R *] app-emulation/cloud-init-21.2::gentoo to /usr/mipsel-unknown-linux-gnu/ USE="-test" PYTHON_TARGETS="python3_9 -python3_8" 0 KiB Total: 2 packages (1 new, 1 reinstall), Size of downloads: 0 KiB ``` Reproducible: Always Steps to Reproduce: 1. crossdev --gcc 11.2.0 --libc 2.33-r7 --target mipsel-unknown-linux-gnu 2. mipsel-unknown-linux-gnu-emerge -pv app-emulation/cloud-init Actual Results: dev-python/pyyaml is not installed to the build host and app-emulation/cloud-init fails during the install phase with error "ModuleNotFoundError: No module named 'yaml'" Expected Results: dev-python/pyyaml is pulled into both the sysroot as runtime dependency _and_ the build host as a build time dependency
Created attachment 750516 [details] mipsel sysroot emerge --info
Created attachment 750519 [details] emerge --info
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d3d9a05421fbb80c960aa728a623f275713cfda3 commit d3d9a05421fbb80c960aa728a623f275713cfda3 Author: Sam James <sam@gentoo.org> AuthorDate: 2021-11-12 01:43:13 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-11-12 01:43:13 +0000 app-emulation/cloud-init: include more in BDEPEND We try to install files using the tool so let's include BDEPEND for now unless we can come up with a more refined approach. Closes: https://bugs.gentoo.org/823206 Signed-off-by: Sam James <sam@gentoo.org> app-emulation/cloud-init/cloud-init-21.2.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)