diff --git a/kuksa_databroker/createbom/bomutil/maplicensefile.py b/kuksa_databroker/createbom/bomutil/maplicensefile.py index 439b9ef7b..044f587d1 100644 --- a/kuksa_databroker/createbom/bomutil/maplicensefile.py +++ b/kuksa_databroker/createbom/bomutil/maplicensefile.py @@ -35,4 +35,6 @@ "rustls-webpki": "webpki.LICENSE.txt.gz", # License text taken from https://spdx.org/licenses/0BSD.html "0BSD": "0BSD.txt.gz", + # License test taken from https://spdx.org/licenses/BSD-3-Clause.html + "BSD-3-Clause": "BSD-3-Clause.txt.gz" } diff --git a/kuksa_databroker/createbom/createbom.py b/kuksa_databroker/createbom/createbom.py index 905a9f030..f704ac0ba 100644 --- a/kuksa_databroker/createbom/createbom.py +++ b/kuksa_databroker/createbom/createbom.py @@ -117,7 +117,7 @@ def generate_bom(source_path, target_path, dashout): errors = [] for crate in crates: try: - print(f"License for {crate['name']}: ", end="") + print(f"License for {crate['name']} {crate['version']}: ", end="") license_filenames = extract_license_filenames(crate) for license_filename in license_filenames: license_files.add(license_filename) @@ -178,7 +178,7 @@ def main(args=None): ) return -2 - if args.dash != None and os.path.exists(args.dash): + if args.dash is not None and os.path.exists(args.dash): print( f"Requested Dash output file {args.dash} exists. Remove it before running this script.") return -3 @@ -195,6 +195,5 @@ def main(args=None): if __name__ == "__main__": - import sys sys.exit(main(sys.argv[1:])) diff --git a/kuksa_databroker/createbom/licensestore/BSD-3-Clause.txt.gz b/kuksa_databroker/createbom/licensestore/BSD-3-Clause.txt.gz new file mode 100644 index 000000000..eb4e7256d Binary files /dev/null and b/kuksa_databroker/createbom/licensestore/BSD-3-Clause.txt.gz differ