Fix typos and add info where to find license-validate
This commit is contained in:
parent
06bf5fc3d1
commit
f2292967e5
@ -14,7 +14,7 @@
|
||||
# * run bundled_licenses.py on the binary RPMs to see what is
|
||||
# bundled in the shipped RPMs
|
||||
# * validate the output of bundled_licenses.py
|
||||
# * add licenses identiefied in the source code of nodejs itself
|
||||
# * add licenses identified in the source code of nodejs itself
|
||||
# * validate the resulting License tag suggestion by license-validate tool
|
||||
|
||||
import argparse
|
||||
@ -63,7 +63,7 @@ def license_from_package_json(file_path):
|
||||
return ' AND '.join([parse_license_tag(license) for license in data['licenses']])
|
||||
else:
|
||||
if 'name' in data and 'version' in data:
|
||||
print(f"Error: Key license not found in {file_path} despite it looks like a valid package.json file")
|
||||
print(f"Error: Key license not found in {file_path} despite it looking like a valid package.json file")
|
||||
else:
|
||||
print(f"Warning: Key license not found in {file_path} but it might not be a valid package.json file at all")
|
||||
except json.JSONDecodeError as e:
|
||||
@ -76,13 +76,13 @@ if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description='Find and parse package.json '\
|
||||
'files in specified directories, and return probable License tag to '\
|
||||
'be used in an RPM spec file. It is likely better to run it on '\
|
||||
'unpackged or installed RPMs, rather than unpacked source, because '\
|
||||
'some of the bundled deps are not likely used in the shipped output. '\
|
||||
'unpacked or installed RPMs, rather than unpacked source, because '\
|
||||
'some of the bundled deps are likely not used in the shipped output. '\
|
||||
'It is always necessary to manually verify the results by investigating '\
|
||||
'the files and the resulting License tag may be verified using '\
|
||||
'license-validate tool.')
|
||||
'license-validate tool (check license-validate RPM in Fedora) .')
|
||||
parser.add_argument('directories', nargs='*', default=[os.getcwd()],
|
||||
help='Directories to search for package.json files, if no is given, use the current directory.')
|
||||
help='Directories to search for package.json files, if none is given, use the current directory.')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
@ -95,5 +95,5 @@ if __name__ == "__main__":
|
||||
licenses.add(fix_known_spdx_issues(l))
|
||||
print(f"OK: License detected in {f}: {l}")
|
||||
print('Final license tag to be used in the RPM spec file (please, confirm manually '\
|
||||
'buy looking into files and validate using license-validate tool):')
|
||||
print('Lincese: ' + ' AND '.join(sorted(licenses)))
|
||||
'by looking into files and validate using the license-validate tool):')
|
||||
print('License: ' + ' AND '.join(sorted(licenses)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user