Not able to copy files to root_fs

hello i spent a lot of times trying to bitbake this recipe but for nothing i literally have a huge problem with not being able to copy folders/files combined when i used install i have the ommiting folders error when i use cp -r without this FILES:${PN} += “/usr/lib/python3.10/site-packages/openai/” i have the error of files installed but not shipped and when i add it i got logs only

SUMMARY = "Python client library for OpenAI's API"
HOMEPAGE = "https://pypi.org/project/openai/"

SRC_URI = "https://files.pythonhosted.org/packages/02/c1/1a73330576ea707899ac69b9d17db86d8454d0bdc4dcac33358fdfdbfcf4/openai-1.51.1-py3-none-any.whl;downloadfilename=openai-${PV}-py3-none-any.zip;subdir=python3-openai-1.51.1"

SRC_URI[md5sum] = "1a34f5dcc07660227be5c396ec878ca6"
SRC_URI[sha256sum] = "035ba637bef7523282b5b8d9f2f5fdc0bb5bc18d52af2bfc7f64e4a7b0a169fb"

inherit python3-dir

LICENSE = "MIT"
LIC_FILES_CHKSUM = "file:///${S}/openai-${PV}.dist-info/METADATA;md5=2836a612e481755a98cca890fca777d5"

do_unpack[depends] += "unzip-native:do_populate_sysroot"

DEPENDS += "python3"
FILES:${PN} += "/usr/lib/python3.10/site-packages/openai/"

do_install() {
    install -d ${D}${PYTHON_SITEPACKAGES_DIR}/openai
    cp -r ${S}/openai/* ${D}${PYTHON_SITEPACKAGES_DIR}/openai/
}

is there something wrong with my recipe why do all what i get in my workdir are logs only logs i have only temp folder there

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Based on the context provided, it seems like there are a few potential issues with your Yocto recipe that could be causing the problems you’re experiencing:

  1. Source Directory Check: Ensure that the ${S}/openai/ directory actually contains the files you expect before the do_install step. If this directory is empty or does not exist, the cp -r command will not copy anything, leading to the ‘files installed but not shipped’ error.

  2. Correct Use of FILES Variable: The FILES:${PN} variable is used to specify which files should be included in the package. Make sure that the path you are specifying (/usr/lib/python3.10/site-packages/openai/) matches the destination path in the do_install function. If the files are not being copied to this path, they will not be included in the package.

  3. Log Investigation: Check the logs generated during the bitbake process for any specific error messages. These logs can provide more insight into what might be going wrong during the installation process.

  4. Command Structure: Ensure that the install and cp commands are correctly structured. The install command is used to create directories, and the cp command is used to copy files. Make sure that the source path in the cp command is correct and that the destination directory exists.

  5. Unpacking and Source Path: Verify that the do_unpack step is correctly unpacking the source files to the expected location. If the files are not being unpacked correctly, they will not be available for the do_install step.

By addressing these points, you should be able to resolve the issues with your recipe and successfully install the OpenAI Python client library. If the problem persists, consider adding more debug information or manually inspecting the work directory to ensure the files are where you expect them to be.

Please, also check if these links can help you solve your problem:

Solved: Bitbake not installing files from recipe to rootfs - NXP Community.

when i run the steps one by one do fetch the do install everything works fine no problem occurs but when i do bitbake the whole recipe at once all what i get are logs

Hi @rania !

We sent you an email yesterday about your open questions here on Community.

Please answer us there when you have time.

Best regards,

the build completed successfully all what i did was rebuilding the recipe again and it worked

Hi @rania !

Thank you for sharing the solution!

Best regards,