Bug 15617 - Conflict between generated pyc files and shipped pyc files in sysroot
Summary: Conflict between generated pyc files and shipped pyc files in sysroot
Status: NEW
Alias: None
Product: Functional (self) Testing
Classification: QA/Testing
Component: oe-selftest (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 6.99
Assignee: Ross Burton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2024-10-10 13:08 UTC by Mathieu Dubois-Briand
Modified: 2026-01-29 15:58 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu Dubois-Briand 2024-10-10 13:08:24 UTC
Seen during oe-selftest-centos on alma9-vk-2

ERROR: ovmf-edk2-stable202408-r0 do_prepare_recipe_sysroot: Error executing a python function in exec_func_python() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python() autogenerated', lineno: 2, function: <module>
     0001:
 *** 0002:extend_recipe_sysroot(d)
     0003:
File: '/srv/pokybuild/yocto-worker/oe-selftest-centos/build/meta/classes-global/staging.bbclass', lineno: 624, function: extend_recipe_sysroot
     0620:
     0621:    # Handle deferred binfiles
     0622:    for l in binfiles:
     0623:        (targetdir, dest) = binfiles[l]
 *** 0624:        staging_copyfile(l, targetdir, dest, postinsts, seendirs)
     0625:
     0626:    bb.note("Installed into sysroot: %s" % str(msg_adding))
     0627:    bb.note("Skipping as already exists in sysroot: %s" % str(msg_exists))
     0628:
File: '/srv/pokybuild/yocto-worker/oe-selftest-centos/build/meta/classes-global/staging.bbclass', lineno: 165, function: staging_copyfile
     0161:        os.symlink(linkto, dest)
     0162:        #bb.warn(c)
     0163:    else:
     0164:        try:
 *** 0165:            os.link(c, dest)
     0166:        except OSError as err:
     0167:            if err.errno == errno.EXDEV:
     0168:                bb.utils.copyfile(c, dest)
     0169:            else:
Exception: FileExistsError: [Errno 17] File exists: '/srv/pokybuild/yocto-worker/oe-selftest-centos/build/build-st-78767/tmp/sysroots-components/x86_64/ovmf-native/usr/bin/edk2_basetools/BaseTools/Source/Python/build/__pycache__/buildoptions.cpython-39.pyc' -> '/srv/pokybuild/yocto-worker/oe-selftest-centos/build/build-st-78767/tmp/work/core2-64-poky-linux/ovmf/edk2-stable202408/recipe-sysroot-native/usr/bin/edk2_basetools/BaseTools/Source/Python/build/__pycache__/buildoptions.cpython-39.pyc'
Comment 1 Tim Orling 2024-10-10 15:04:33 UTC
We should not be shipping native .pyc files, since they can be built by host python.
Comment 2 Richard Purdie 2024-10-17 15:11:04 UTC
We fixed immediate ovmf issue: https://git.yoctoproject.org/poky/commit/?id=a375e2d35dbf2c7b32a3640a160244b3c689c02e so we can drop to medium+
Comment 3 Ross Burton 2024-10-17 15:13:00 UTC
Generalising the summary.
Comment 4 Randy MacLeod 2026-01-29 15:58:31 UTC
Not AB-INT but could still be a problem.