Recipes that inherit cross should also be categorized as isNative

Signed-off-by: Saul Wold <saul.w...@windriver.com>
---
 classes/create-spdx.bbclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/classes/create-spdx.bbclass b/classes/create-spdx.bbclass
index 72a9b55..883bc23 100644
--- a/classes/create-spdx.bbclass
+++ b/classes/create-spdx.bbclass
@@ -418,8 +418,9 @@ 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"))
+    recipe.annotations.append(create_annotation(d, "SPDXDIR:%s" % 
str(spdx_workdir).replace(str(top_dir) +'/', '')))
 
     for s in d.getVar('SRC_URI').split():
         if not s.startswith("file://"):
@@ -610,7 +611,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")
 
-- 
2.31.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157460): 
https://lists.openembedded.org/g/openembedded-core/message/157460
Mute This Topic: https://lists.openembedded.org/mt/86616600/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to