Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BCD-3-Clause support #631

Merged
merged 1 commit into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions kuksa_databroker/createbom/bomutil/maplicensefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
5 changes: 2 additions & 3 deletions kuksa_databroker/createbom/createbom.py
Original file line number Diff line number Diff line change
Expand Up @@ -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="")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to get output with version like:

2023-07-31T16:02:41.7150426Z #0 6.859 License for matchit 0.7.1: MIT.txt BSD-3-Clause.txt

Reason is to be able to compare successful/unsuccessful builds and see if the error because of an updated version.

license_filenames = extract_license_filenames(crate)
for license_filename in license_filenames:
license_files.add(license_filename)
Expand Down Expand Up @@ -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
Expand All @@ -195,6 +195,5 @@ def main(args=None):


if __name__ == "__main__":
import sys

sys.exit(main(sys.argv[1:]))
Binary file not shown.