Lines Matching full:write

29 …f.write(f"Relationship: {_normalize_spdx_name(rln.refA)} {rln.rlnType} {_normalize_spdx_name(rln.r…
38 f.write(f"""FileName: ./{bf.relpath}
43 f.write(f"FileChecksum: SHA256: {bf.sha256}\n")
45 f.write(f"FileChecksum: MD5: {bf.md5}\n")
46 f.write(f"LicenseConcluded: {bf.concludedLicense}\n")
48 f.write(f"LicenseInfoInFile: NONE\n")
51 f.write(f"LicenseInfoInFile: {licInfoInFile}\n")
52 f.write(f"FileCopyrightText: {bf.copyrightText}\n\n")
54 # write file relationships
58 f.write("\n")
76 f.write(f"""##### Package: {spdx_normalized_name}
82 f.write(f"""PackageLicenseDeclared: {pkg.cfg.declaredLicense}
87 f.write(f"PrimaryPackagePurpose: {pkg.cfg.primaryPurpose}\n")
91 f.write(f"PackageDownloadLocation: {downloadUrl}\n")
93 f.write("PackageDownloadLocation: NOASSERTION\n")
96 f.write(f"PackageVersion: {pkg.cfg.version}\n")
98 f.write(f"PackageVersion: {pkg.cfg.revision}\n")
102 f.write(f"ExternalRef: SECURITY cpe23Type {ref}\n")
104 f.write(f"ExternalRef: PACKAGE_MANAGER purl {ref}\n")
112 f.write(f"PackageLicenseInfoFromFiles: {licFromFiles}\n")
114 f.write(f"PackageLicenseInfoFromFiles: NOASSERTION\n")
115 f.write(f"FilesAnalyzed: true\nPackageVerificationCode: {pkg.verificationCode}\n\n")
117 f.write(f"FilesAnalyzed: false\nPackageComment: Utility target; no files\n\n")
119 # write package relationships
123 f.write("\n")
125 # write package files, if any
137 f.write(f"""LicenseID: {lic}
150 f.write(f"""SPDXVersion: SPDX-2.3
160 # write any external document references
165 …f.write(f"ExternalDocumentRef: {extDoc.cfg.docRefID} {extDoc.cfg.namespace} SHA1: {extDoc.myDocSHA…
166 f.write(f"\n")
168 # write relationships owned by this Document (not by its Packages, etc.), if any
172 f.write(f"\n")
174 # write packages
178 # write other license info, if any
183 # Open SPDX document file for writing, write the document, and calculate
186 # 1) spdxPath: path to write SPDX document
187 # 2) doc: SPDX Document object to write
189 # create and write document to disk
195 log.err(f"Error: Unable to write to {spdxPath}: {str(e)}")