From 143103a1c457ebfd4fe088cc5d8233b934d3e2a9 Mon Sep 17 00:00:00 2001 From: Joshua Watt Date: Tue, 11 Mar 2025 08:03:02 -0600 Subject: lib: Fix dependencies on SPDX code The SPDX library code was being ignored from taskhash calculations due to accidentally being omitted from BBIMPORTS. This meant that changes in the code or dependent variables would not cause the task to rebuild correctly. In order to add spdx_common, convert the `Dep` object from a named tuple to a frozen dataclass. These function more or less equivalently, but the bitbake code parser cannot handle named tuples. Finally, the vardepsexclude that used to be present on the recipe tasks needs to be moved to the python code in order for the variables to be correctly ignored. Several unused exclusions were removed (From OE-Core rev: eb597bf61cbcb0a4d43149404c93eec0894fb4c7) Signed-off-by: Joshua Watt Signed-off-by: Richard Purdie --- meta/classes/create-spdx-3.0.bbclass | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'meta/classes') diff --git a/meta/classes/create-spdx-3.0.bbclass b/meta/classes/create-spdx-3.0.bbclass index 25f3aa5f43..b4a5156e70 100644 --- a/meta/classes/create-spdx-3.0.bbclass +++ b/meta/classes/create-spdx-3.0.bbclass @@ -134,7 +134,6 @@ python do_create_spdx() { import oe.spdx30_tasks oe.spdx30_tasks.create_spdx(d) } -do_create_spdx[vardepsexclude] += "BB_NUMBER_THREADS SPDX_BUILD_HOST" do_create_spdx[vardeps] += "\ SPDX_INCLUDE_BITBAKE_PARENT_BUILD \ SPDX_PACKAGE_ADDITIONAL_PURPOSE \ @@ -170,7 +169,7 @@ python do_create_package_spdx() { import oe.spdx30_tasks oe.spdx30_tasks.create_package_spdx(d) } -do_create_package_spdx[vardepsexclude] += "OVERRIDES SPDX_MULTILIB_SSTATE_ARCHS" +oe.spdx30_tasks.create_package_spdx[vardepsexclude] = "OVERRIDES" addtask do_create_package_spdx after do_create_spdx before do_build do_rm_work SSTATETASKS += "do_create_package_spdx" -- cgit v1.2.3-54-g00ecf