summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaul Wold <Saul.Wold@windriver.com>2021-10-26 18:30:50 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-28 14:16:26 +0100
commitee113e3894deb1cfb18622085a3fe0600e1ef01d (patch)
tree2aedb301f401679c8b8a7a7f27994db3575b5b79
parent1f8fdb7dc9d02d0ee3c42674ca16e03f0ec18cba (diff)
downloadopenembedded-core-contrib-ee113e3894deb1cfb18622085a3fe0600e1ef01d.tar.gz
create-spdx: cross recipes are native also
Recipes that inherit cross should also be categorized as isNative Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-rw-r--r--meta/classes/create-spdx.bbclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/create-spdx.bbclass b/meta/classes/create-spdx.bbclass
index aa9514121d..c35dbe1184 100644
--- a/meta/classes/create-spdx.bbclass
+++ b/meta/classes/create-spdx.bbclass
@@ -422,7 +422,7 @@ python do_create_spdx() {
recipe.name = d.getVar("PN")
recipe.versionInfo = d.getVar("PV")
recipe.SPDXID = oe.sbom.get_recipe_spdxid(d)
- if bb.data.inherits_class("native", d):
+ if bb.data.inherits_class("native", d) or bb.data.inherits_class("cross", d):
recipe.annotations.append(create_annotation(d, "isNative"))
for s in d.getVar('SRC_URI').split():
@@ -614,7 +614,7 @@ python do_create_runtime_spdx() {
deploy_dir_spdx = Path(d.getVar("DEPLOY_DIR_SPDX"))
spdx_deploy = Path(d.getVar("SPDXRUNTIMEDEPLOY"))
- is_native = bb.data.inherits_class("native", d)
+ is_native = bb.data.inherits_class("native", d) or bb.data.inherits_class("cross", d)
creation_time = datetime.now(tz=timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")