@@ -300,11 +300,15 @@ def create_package_code(session, package, version):
300300
301301 time = datetime .now ()
302302 now = str (time .date ()) + 'T' + str (time .time ()).split ('.' )[0 ] + 'Z'
303-
303+ if not c .header .upstream_name :
304+ upstream = package
305+ print package
306+ else :
307+ upstream = c .header .upstream_name
304308 spdx = ["SPDXVersion: SPDX-2.0" , "DataLicense:CC0-1.0" ,
305309 "SPDXID: SPDXRef-DOCUMENT" ,
306310 "Relationship: SPDXRef-DOCUMENT DESCRIBES SPDXRef-Package" ,
307- "DocumentName: " + c . header . upstream_name ,
311+ "DocumentName: " + upstream ,
308312 "DocumentNamespace: http://spdx.org/spdxdocs/" +
309313 "spdx-example-444504E0-4F89-41D3-9A0C-0305E82C3301" ,
310314 "LicenseListVersion: 2.0" ,
@@ -320,7 +324,7 @@ def create_package_code(session, package, version):
320324 "Debian and Debsources. </text>" ,
321325 "DocumentComment: <text>This document was created using" +
322326 "SPDX 2.0, version 2.3 of the SPDX License List.</text>" ,
323- "PackageName: " + c . header . upstream_name ,
327+ "PackageName: " + upstream ,
324328 "SPDXID: SPDXRef-Package" ,
325329 "PackageDownloadLocation: NOASSERTION" ,
326330 "PackageVerificationCode: " + create_package_code (session ,
0 commit comments