Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 823206 - app-emulation/cloud-init-21.2 cross-compile fails to pull in dev-python/pyyaml on build system
Summary: app-emulation/cloud-init-21.2 cross-compile fails to pull in dev-python/pyyam...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Matthew Thode ( prometheanfire )
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-12 01:37 UTC by Aaron D Borden
Modified: 2021-11-12 01:43 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
mipsel sysroot emerge --info (mipsel-unknown-linux-gnu-emerge--info.txt,4.85 KB, text/plain)
2021-11-12 01:40 UTC, Aaron D Borden
Details
emerge --info (emerge--info.txt,5.09 KB, text/plain)
2021-11-12 01:41 UTC, Aaron D Borden
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron D Borden 2021-11-12 01:37:46 UTC
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
Comment 1 Aaron D Borden 2021-11-12 01:40:42 UTC
Created attachment 750516 [details]
mipsel sysroot emerge --info
Comment 2 Aaron D Borden 2021-11-12 01:41:13 UTC
Created attachment 750519 [details]
emerge --info
Comment 3 Larry the Git Cow gentoo-dev 2021-11-12 01:43:45 UTC
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(-)