]> code.ossystems Code Review - openembedded-core.git/commitdiff
spdx.py: Add SPDXAnnotation Object
authorSaul Wold <Saul.Wold@windriver.com>
Mon, 27 Sep 2021 17:22:16 +0000 (10:22 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 27 Sep 2021 23:14:46 +0000 (00:14 +0100)
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>
meta/lib/oe/spdx.py

index 9814fbfd663c952221b77d5d9995986e9d4f66c7..a99e54ff404b20d5d7ad2d2286d7c72aff726875 100644 (file)
@@ -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):