Bug 15900 - image_types_wic: incorrect dependencies on wks files and WKS_SEARCH_PATH
Summary: image_types_wic: incorrect dependencies on wks files and WKS_SEARCH_PATH
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: oe-core other (show other bugs)
Version: 6.0
Hardware: All Multiple
: Medium+ normal
Target Milestone: 5.3 M4
Assignee: Trevor Woerner
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2025-06-10 07:17 UTC by Frederic Hoerni
Modified: 2025-08-21 15:06 UTC (History)
2 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 Frederic Hoerni 2025-06-10 07:17:00 UTC
Adding a wks file earlier in the search path is not taken
into account automatically when bitbaking an image recipe using wic.

One need to run bitbake -c cleansstate for the new file to be taken into account.

To reproduce the issue:

1. Init (use default WKS_FILE="qemux86-directdisk.wks")

    . oe-init-build-env
    echo 'IMAGE_FSTYPES += "wic"' >> conf/local.conf

2. First clean build

    rm -f wic/qemux86-directdisk.wks
    bitbake core-image-minimal -c cleansstate && bitbake core-image-minimal

3. Create an override for WKS_FILE (earlier in WKS_SEARCH_PATH)
and introduce an error (a very small partition size) so that we can see it happen (or not).

    mkdir -p wic
    echo "part / --source rootfs --fstype=ext4 --fixed-size 1M" > wic/qemux86-directdisk.wks

4. Build again

    bitbake core-image-minimal
    ...
    NOTE: Tasks Summary: Attempted 4670 tasks of which 4670 didn't need to be rerun and all succeeded.

=> Nothing gets built, whereas we should see this error:
| ERROR: Actual rootfs size (28713 kB) is larger than allowed size 1024 kB


I have proposed a patch here:
https://lists.openembedded.org/g/openembedded-core/message/216887