Search code examples
yoctobitbakeopenembeddedrecipeyocto-recipe

Include meta-python-image in custom image


Is there a way to include meta-python-image.bb to my custom image recipe? My end expectation is to include "packagegroup-meta-python3" in my custom image generated rootfs. meta-python-image.bb has this packagegroup already. I have used the meta-openembedded/meta-python available in https://github.com/openembedded/meta-openembedded.git (branch : kirkstone)

I have included following in bblayer configuration -

/home/user/poky-bridge12/meta-openembedded/meta-gnome \
/home/user/poky-bridge12/meta-openembedded/meta-python \
/home/user/poky-bridge12/meta-openembedded/meta-networking \
/home/user/poky-bridge12/meta-openembedded/meta-oe \

and tried keeping "packagegroup-meta-python3" as part of IMAGE_INSTALL:append but it didn't work out. I got following error-

ERROR: fms-image-1.0-r0 do_rootfs: Could not invoke dnf.

DNF version: 4.11.1
cachedir: /home/user/poky-bridge12/build/tmp/work/jetson_xavier_nx_devkit-poky-linux/fms-image/1.0-r0/rootfs/var/cache/dnf
Added oe-repo repo from /home/user/poky-bridge12/build/tmp/work/jetson_xavier_nx_devkit-poky-linux/bridge12-image/1.0-r0/oe-rootfs-repo
User-Agent: falling back to 'libdnf': could not detect OS or basearch
repo: using cache for: oe-repo
oe-repo: using metadata from Thu 30 Nov 2023 05:21:12 AM UTC.
Last metadata expiration check: 0:00:02 ago on Thu 30 Nov 2023 05:23:02 AM UTC.
--> Starting dependency resolution
--> Finished dependency resolution
Error:
 Problem: conflicting requests
  - nothing provides python3-pybind11-json needed by packagegroup-meta-python3-1.0-r0.noarch
(try to add '--skip-broken' to skip uninstallable packages)

Appreciate any help. Thank you.


Solution

  • The only reason that image and packagegroup exists is for the maintainers of meta-python to have a simple way to build all of the python modules in that layer, so there's not really a good reason for anyone else to use that packagegroup or image.

    Looking at the content of that recipe:

    $ oe-pkgdata-util list-pkg-files -p python3-pybind11-json
    
    python3-pybind11-json-dbg:
    python3-pybind11-json-dev:
        /usr/include/pybind11_json/pybind11_json.hpp
        /usr/share/cmake/pybind11_json/pybind11_jsonConfig.cmake
        /usr/share/cmake/pybind11_json/pybind11_jsonConfigVersion.cmake
        /usr/share/cmake/pybind11_json/pybind11_jsonTargets.cmake
    

    Looks like python3-pybind11-json only builds a -dev package, and so shouldn't be listed in that packagegroup.