summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaul Wold <Saul.Wold@windriver.com>2021-09-27 10:22:16 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-28 00:14:46 +0100
commit8db551bba619f3b3612c59270043148214a462cc (patch)
tree9652d9cfa956663003862f925ee5716477713910
parent2b5f01cf5a92a873ac4c3f0ba0584cab2cc05714 (diff)
downloadopenembedded-core-contrib-8db551bba619f3b3612c59270043148214a462cc.tar.gz
spdx.py: Add SPDXAnnotation Object
This is added to allow the create-spdx code to create annotations that store values properly according to the SPDX Specification. Initialy they will be used to track if a recipe is a native type. Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oe/spdx.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/lib/oe/spdx.py b/meta/lib/oe/spdx.py
index 9814fbfd66..a99e54ff40 100644
--- a/meta/lib/oe/spdx.py
+++ b/meta/lib/oe/spdx.py
@@ -123,6 +123,12 @@ class SPDXObject(metaclass=MetaSPDXObject):
raise KeyError("%r is not a valid SPDX property" % name)
+class SPDXAnnotation(SPDXObject):
+ annotationDate = _String()
+ annotationType = _String()
+ annotator = _String()
+ comment = _String()
+
class SPDXChecksum(SPDXObject):
algorithm = _String()
checksumValue = _String()
@@ -164,6 +170,7 @@ class SPDXPackage(SPDXObject):
packageVerificationCode = _Object(SPDXPackageVerificationCode)
hasFiles = _StringList()
packageFileName = _String()
+ annotations = _ObjectList(SPDXAnnotation)
class SPDXFile(SPDXObject):