diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-07-26 11:22:35 -0500 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2024-08-06 19:11:18 -0700 |
| commit | e1f0aceba132f325bc43cf093fc5a71a07346e48 (patch) | |
| tree | 1984d74dce76f3f5c219dff6456ea61c6824465a /meta | |
| parent | 86324b2306828d7aeef7373fa62c42e118091c1c (diff) | |
| download | poky-e1f0aceba132f325bc43cf093fc5a71a07346e48.tar.gz | |
create-spdx-3.0/populate_sdk_base: Add SDK_CLASSES inherit mechanism to fix tarball SPDX manifests
Currently, "tarball" sdk based recipes don't generate SPDX manifests as they
don't include the rootfs generation classes. Split the SPDX 3.0 image class into
two so the SDK components can be included where needed.
To do this, introduce an SDK_CLASSES variable similar to IMAGE_CLASSES which
the SDK code can use.
Migrate testsdk usage to this.
Also move the image/sdk spdx classes to classes-recipe rather than the general classes
directory since they'd never be included on a global level.
For buildtools-tarball, it has its own testsdk functions so disable the class there as
a deferred inherit would overwrite it.
(From OE-Core rev: 95660951a09e2a3fe63eb1017ad8f1d7fc9cd503)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 662396533177b72cc1d83e95841b27f7e42dcb20)
Eliminate spdx-3.0 items, not applicable to Scarthgap.
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/classes-recipe/populate_sdk_base.bbclass | 3 | ||||
| -rw-r--r-- | meta/classes-recipe/testimage.bbclass | 2 | ||||
| -rw-r--r-- | meta/recipes-core/meta/buildtools-tarball.bb | 3 |
3 files changed, 6 insertions, 2 deletions
diff --git a/meta/classes-recipe/populate_sdk_base.bbclass b/meta/classes-recipe/populate_sdk_base.bbclass index 6cb43ade30..a103e7b738 100644 --- a/meta/classes-recipe/populate_sdk_base.bbclass +++ b/meta/classes-recipe/populate_sdk_base.bbclass | |||
| @@ -4,6 +4,9 @@ | |||
| 4 | # SPDX-License-Identifier: MIT | 4 | # SPDX-License-Identifier: MIT |
| 5 | # | 5 | # |
| 6 | 6 | ||
| 7 | SDK_CLASSES += "${@bb.utils.contains("IMAGE_CLASSES", "testimage", "testsdk", "", d)}" | ||
| 8 | inherit_defer ${SDK_CLASSES} | ||
| 9 | |||
| 7 | PACKAGES = "" | 10 | PACKAGES = "" |
| 8 | 11 | ||
| 9 | # This exists as an optimization for SPDX processing to only run in image and | 12 | # This exists as an optimization for SPDX processing to only run in image and |
diff --git a/meta/classes-recipe/testimage.bbclass b/meta/classes-recipe/testimage.bbclass index ed0d87b7a7..2f68f83dfd 100644 --- a/meta/classes-recipe/testimage.bbclass +++ b/meta/classes-recipe/testimage.bbclass | |||
| @@ -483,5 +483,3 @@ python () { | |||
| 483 | if oe.types.boolean(d.getVar("TESTIMAGE_AUTO") or "False"): | 483 | if oe.types.boolean(d.getVar("TESTIMAGE_AUTO") or "False"): |
| 484 | bb.build.addtask("testimage", "do_build", "do_image_complete", d) | 484 | bb.build.addtask("testimage", "do_build", "do_image_complete", d) |
| 485 | } | 485 | } |
| 486 | |||
| 487 | inherit testsdk | ||
diff --git a/meta/recipes-core/meta/buildtools-tarball.bb b/meta/recipes-core/meta/buildtools-tarball.bb index 92fbda335d..e2ce5b3ecf 100644 --- a/meta/recipes-core/meta/buildtools-tarball.bb +++ b/meta/recipes-core/meta/buildtools-tarball.bb | |||
| @@ -112,6 +112,9 @@ INHIBIT_DEFAULT_DEPS = "1" | |||
| 112 | # Directory in testsdk that contains testcases | 112 | # Directory in testsdk that contains testcases |
| 113 | TESTSDK_CASES = "buildtools-cases" | 113 | TESTSDK_CASES = "buildtools-cases" |
| 114 | 114 | ||
| 115 | # We have our own code, avoid deferred inherit | ||
| 116 | SDK_CLASSES:remove = "testsdk" | ||
| 117 | |||
| 115 | python do_testsdk() { | 118 | python do_testsdk() { |
| 116 | import oeqa.sdk.testsdk | 119 | import oeqa.sdk.testsdk |
| 117 | testsdk = oeqa.sdk.testsdk.TestSDK() | 120 | testsdk = oeqa.sdk.testsdk.TestSDK() |
