create-spdx-image-3.0: Image SPDX/SBOM tasks are retained for eSDK installation
PATCH v4 1/2 create-spdx-image-3.0: Image SPDX/SBOM tasks are retained for eSDK installation
From: Jayasurya Maganuru <[email protected]>
Fixes [YOCTO #15853]
Image SPDX/SBOM tasks were running after do_sdk_depends, causing their signatures to be excluded from locked-sigs.inc. As a result, the eSDK installer attempted to re-run these tasks, leading to unexpected task execution errors.
Run do_create_image_sbom_spdx before do_sdk_depends to ensure all image SPDX/SBOM tasks are completed and captured in the locked signatures.
---
v4:
- Split the original patch into two patches as suggested.
- Addressed shortlog length warning.
meta/classes-recipe/create-spdx-image-3.0.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes-recipe/create-spdx-image-3.0.bbclass +1 -1
@@ -69,7 +69,7 @@ python do_create_image_sbom_spdx() { import oe.spdx30_tasks oe.spdx30_tasks.create_image_sbom_spdx(d) } -addtask do_create_image_sbom_spdx after do_create_rootfs_spdx do_create_image_spdx before do_build +addtask do_create_image_sbom_spdx after do_create_rootfs_spdx do_create_image_spdx before do_build do_sdk_depends SSTATETASKS += "do_create_image_sbom_spdx" SSTATE_SKIP_CREATION:task-create-image-sbom = "1" do_create_image_sbom_spdx[sstate-inputdirs] = "${SPDXIMAGEDEPLOYDIR}"
Signature · 1 line
2.49.1
PATCH v4 2/2 populate_sdk_ext: keep SDK_TARGETS so SPDX/SBOM tasks remain in locked sigs
From: Jayasurya Maganuru <[email protected]>
Fixes [YOCTO #15853]
The filtering in populate_sdk_ext.bbclass was removing all image targets from the locked signatures, including the main SDK images (SDK_TARGETS). As a result, their tasks including the image SPDX/SBOM tasks were not added to locked-sigs.inc.
Without these entries, the eSDK lacked the necessary sstate, and the installer attempted to run the missing tasks during installation, leading to unexpected task execution errors.
This patch keeps SDK_TARGETS (and their multilib variants) in the locked signatures so their SPDX/SBOM tasks are included. With those tasks in the sstate cache, the eSDK installs cleanly without needing to re-run anything.
---
v4:
- Split the original patch into two patches as suggested.
- Improved commit message for populate_sdk_ext.bbclass.
- Addressed shortlog length warning.
meta/classes-recipe/populate_sdk_ext.bbclass | 9 +++++++++ 1 file changed, 9 insertions(+)
meta/classes-recipe/populate_sdk_ext.bbclass +9 -0
@@ -460,6 +460,15 @@ def prepare_locked_cache(d, baseoutpath, derivative, conf_initpath): # Filter the locked signatures file to just the sstate tasks we are interested in excluded_targets = get_sdk_install_targets(d, images_only=True) + sdk_targets = d.getVar('SDK_TARGETS') + ext_sdk_target_set = set(multilib_pkg_extend(d, sdk_targets).split()) + excluded_set = set(excluded_targets.split()) + + # Ensure SDK_TARGETS and their image SPDX/SBOM tasks are included in the locked signatures, + # as they are required during eSDK installation. + filtered_excluded_set = excluded_set - ext_sdk_target_set + excluded_targets = ' '.join(filtered_excluded_set) + sigfile = d.getVar('WORKDIR') + '/locked-sigs.inc' lockedsigs_pruned = baseoutpath + '/conf/locked-sigs.inc' #nativesdk-only sigfile to merge into locked-sigs.inc
Signature · 1 line
2.49.1