diff options
author | Saul Wold <Saul.Wold@windriver.com> | 2021-10-26 18:30:50 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-11-08 23:41:00 +0000 |
commit | b922f5cfa1d9347939502cb617ad87c4f4b9fecb (patch) | |
tree | 289b8204d1a38065e3ba12813ee25fe7934a5e55 | |
parent | ceb1f52dff8567322b989d03cde439034a56e2da (diff) | |
download | poky-b922f5cfa1d9347939502cb617ad87c4f4b9fecb.tar.gz |
create-spdx: cross recipes are native also
Recipes that inherit cross should also be categorized as isNative
(From OE-Core rev: 9edd5e3eeec447a1d90ebbfc681c84d7047933ec)
Signed-off-by: Saul Wold <saul.wold@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit ee113e3894deb1cfb18622085a3fe0600e1ef01d)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/create-spdx.bbclass | 4 |
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() { | |||
422 | recipe.name = d.getVar("PN") | 422 | recipe.name = d.getVar("PN") |
423 | recipe.versionInfo = d.getVar("PV") | 423 | recipe.versionInfo = d.getVar("PV") |
424 | recipe.SPDXID = oe.sbom.get_recipe_spdxid(d) | 424 | recipe.SPDXID = oe.sbom.get_recipe_spdxid(d) |
425 | if bb.data.inherits_class("native", d): | 425 | if bb.data.inherits_class("native", d) or bb.data.inherits_class("cross", d): |
426 | recipe.annotations.append(create_annotation(d, "isNative")) | 426 | recipe.annotations.append(create_annotation(d, "isNative")) |
427 | 427 | ||
428 | for s in d.getVar('SRC_URI').split(): | 428 | for s in d.getVar('SRC_URI').split(): |
@@ -614,7 +614,7 @@ python do_create_runtime_spdx() { | |||
614 | 614 | ||
615 | deploy_dir_spdx = Path(d.getVar("DEPLOY_DIR_SPDX")) | 615 | deploy_dir_spdx = Path(d.getVar("DEPLOY_DIR_SPDX")) |
616 | spdx_deploy = Path(d.getVar("SPDXRUNTIMEDEPLOY")) | 616 | spdx_deploy = Path(d.getVar("SPDXRUNTIMEDEPLOY")) |
617 | is_native = bb.data.inherits_class("native", d) | 617 | is_native = bb.data.inherits_class("native", d) or bb.data.inherits_class("cross", d) |
618 | 618 | ||
619 | creation_time = datetime.now(tz=timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ") | 619 | creation_time = datetime.now(tz=timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ") |
620 | 620 | ||