summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorBenjamin Robin (Schneider Electric) <benjamin.robin@bootlin.com>2026-02-09 17:25:52 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2026-02-27 17:45:06 +0000
commitc4da6ca1c2e5d3bdbc78b9e9779071eb50efda71 (patch)
tree56e86d55990f96e11bc4cc1c2c6034cac8757ca5 /meta
parent5e5234a7de24bc64ece3158443c249aca5646d34 (diff)
downloadpoky-c4da6ca1c2e5d3bdbc78b9e9779071eb50efda71.tar.gz
spdx30_tasks: Exclude 'doc' when exporting PACKAGECONFIG to SPDX
Currently when generating an SBOM, all packages have the 'doc' feature indicated as disabled. This is in fact *not* a feature that was declared in the recipe, but instead the documentation of the PACKAGECONFIG variable. But to be safe, if somehow a feature is named 'doc' and enabled, do not exclude it when exporting PACKAGECONFIG features to SPDX. (From OE-Core rev: 87de87206b71bb165b946d5f4f6e9e5395292179) Signed-off-by: Benjamin Robin (Schneider Electric) <benjamin.robin@bootlin.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 933394adcb0d2db66ef7e0656a464241e58ec2e7) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Paul Barker <paul@pbarker.dev> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oe/spdx30_tasks.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/meta/lib/oe/spdx30_tasks.py b/meta/lib/oe/spdx30_tasks.py
index a3d848ceb1..a8970dcca0 100644
--- a/meta/lib/oe/spdx30_tasks.py
+++ b/meta/lib/oe/spdx30_tasks.py
@@ -811,12 +811,14 @@ def create_spdx(d):
811 811
812 if d.getVar("SPDX_INCLUDE_PACKAGECONFIG", True) != "0": 812 if d.getVar("SPDX_INCLUDE_PACKAGECONFIG", True) != "0":
813 packageconfig = (d.getVar("PACKAGECONFIG") or "").split() 813 packageconfig = (d.getVar("PACKAGECONFIG") or "").split()
814 all_features = (d.getVarFlags("PACKAGECONFIG") or {}).keys() 814 all_features = set((d.getVarFlags("PACKAGECONFIG") or {}).keys())
815 blacklisted_features = {"doc"}
815 816
816 if all_features: 817 if all_features:
817 enabled = set(packageconfig) 818 enabled = set(packageconfig)
818 all_features_set = set(all_features) 819 disabled = all_features - enabled
819 disabled = all_features_set - enabled 820 all_features -= disabled & blacklisted_features
821 disabled -= blacklisted_features
820 822
821 for feature in sorted(all_features): 823 for feature in sorted(all_features):
822 status = "enabled" if feature in enabled else "disabled" 824 status = "enabled" if feature in enabled else "disabled"