summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2023-06-01 22:39:10 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-06-02 15:59:07 +0100
commite16c5bfdc5e9dc135a13ad7560779f099f73b8dc (patch)
tree23a7ab0e7aaf4400324083912ee967187157ba1d /meta/classes
parent8fa72c0e9109c2132bf11809c30b1ca001e55eb9 (diff)
downloadpoky-e16c5bfdc5e9dc135a13ad7560779f099f73b8dc.tar.gz
create-spdx-2.2: Add missing variable exclusions
Some variables cause issues with taskhashes and are accounted for in the output in other ways, or don't affect it. Exclude these to improve the taskhashes with create-spdx and allow the sstate selftests to work better. (From OE-Core rev: e7daaa50af4ccd5ccb568f7a380ded18c7f74ab0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/create-spdx-2.2.bbclass9
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/classes/create-spdx-2.2.bbclass b/meta/classes/create-spdx-2.2.bbclass
index b8728c5705..7569f8792b 100644
--- a/meta/classes/create-spdx-2.2.bbclass
+++ b/meta/classes/create-spdx-2.2.bbclass
@@ -338,6 +338,8 @@ def add_package_sources_from_debug(d, package_doc, spdx_package, package, packag
338 338
339 package_doc.add_relationship(pkg_file, "GENERATED_FROM", ref_id, comment=debugsrc) 339 package_doc.add_relationship(pkg_file, "GENERATED_FROM", ref_id, comment=debugsrc)
340 340
341add_package_sources_from_debug[vardepsexclude] += "STAGING_KERNEL_DIR"
342
341def collect_dep_recipes(d, doc, spdx_recipe): 343def collect_dep_recipes(d, doc, spdx_recipe):
342 import json 344 import json
343 from pathlib import Path 345 from pathlib import Path
@@ -684,6 +686,7 @@ python do_create_spdx() {
684 686
685 oe.sbom.write_doc(d, package_doc, d.getVar("SSTATE_PKGARCH"), "packages", indent=get_json_indent(d)) 687 oe.sbom.write_doc(d, package_doc, d.getVar("SSTATE_PKGARCH"), "packages", indent=get_json_indent(d))
686} 688}
689do_create_spdx[vardepsexclude] += "BB_NUMBER_THREADS"
687# NOTE: depending on do_unpack is a hack that is necessary to get it's dependencies for archive the source 690# NOTE: depending on do_unpack is a hack that is necessary to get it's dependencies for archive the source
688addtask do_create_spdx after do_package do_packagedata do_unpack do_collect_spdx_deps before do_populate_sdk do_build do_rm_work 691addtask do_create_spdx after do_package do_packagedata do_unpack do_collect_spdx_deps before do_populate_sdk do_build do_rm_work
689 692
@@ -854,6 +857,8 @@ python do_create_runtime_spdx() {
854 oe.sbom.write_doc(d, runtime_doc, d.getVar("SSTATE_PKGARCH"), "runtime", spdx_deploy, indent=get_json_indent(d)) 857 oe.sbom.write_doc(d, runtime_doc, d.getVar("SSTATE_PKGARCH"), "runtime", spdx_deploy, indent=get_json_indent(d))
855} 858}
856 859
860do_create_runtime_spdx[vardepsexclude] += "OVERRIDES"
861
857addtask do_create_runtime_spdx after do_create_spdx before do_build do_rm_work 862addtask do_create_runtime_spdx after do_create_spdx before do_build do_rm_work
858SSTATETASKS += "do_create_runtime_spdx" 863SSTATETASKS += "do_create_runtime_spdx"
859do_create_runtime_spdx[sstate-inputdirs] = "${SPDXRUNTIMEDEPLOY}" 864do_create_runtime_spdx[sstate-inputdirs] = "${SPDXRUNTIMEDEPLOY}"
@@ -920,6 +925,8 @@ def spdx_get_src(d):
920 finally: 925 finally:
921 d.setVar("WORKDIR", workdir) 926 d.setVar("WORKDIR", workdir)
922 927
928spdx_get_src[vardepsexclude] += "STAGING_KERNEL_DIR"
929
923do_rootfs[recrdeptask] += "do_create_spdx do_create_runtime_spdx" 930do_rootfs[recrdeptask] += "do_create_spdx do_create_runtime_spdx"
924do_rootfs[cleandirs] += "${SPDXIMAGEWORK}" 931do_rootfs[cleandirs] += "${SPDXIMAGEWORK}"
925 932
@@ -1125,3 +1132,5 @@ def combine_spdx(d, rootfs_name, rootfs_deploydir, rootfs_spdxid, packages, spdx
1125 info.gname = "root" 1132 info.gname = "root"
1126 1133
1127 tar.addfile(info, fileobj=index_str) 1134 tar.addfile(info, fileobj=index_str)
1135
1136combine_spdx[vardepsexclude] += "BB_NUMBER_THREADS"