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 17:55:04 +0100
commit859e6a0d00ff3c8c65cb13f837dbbc45d2676e68 (patch)
treefa1e40240fc13d498838568195e98349803253ef
parent64ebd0d97c2552a8fca3e161df6d2a00279ab150 (diff)
downloadpoky-859e6a0d00ff3c8c65cb13f837dbbc45d2676e68.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. (From OE-Core rev: 8db551bba619f3b3612c59270043148214a462cc) 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):
123 raise KeyError("%r is not a valid SPDX property" % name) 123 raise KeyError("%r is not a valid SPDX property" % name)
124 124
125 125
126class SPDXAnnotation(SPDXObject):
127 annotationDate = _String()
128 annotationType = _String()
129 annotator = _String()
130 comment = _String()
131
126class SPDXChecksum(SPDXObject): 132class SPDXChecksum(SPDXObject):
127 algorithm = _String() 133 algorithm = _String()
128 checksumValue = _String() 134 checksumValue = _String()
@@ -164,6 +170,7 @@ class SPDXPackage(SPDXObject):
164 packageVerificationCode = _Object(SPDXPackageVerificationCode) 170 packageVerificationCode = _Object(SPDXPackageVerificationCode)
165 hasFiles = _StringList() 171 hasFiles = _StringList()
166 packageFileName = _String() 172 packageFileName = _String()
173 annotations = _ObjectList(SPDXAnnotation)
167 174
168 175
169class SPDXFile(SPDXObject): 176class SPDXFile(SPDXObject):