Assuming this is the input:
| about_resource |
name |
license_expression |
license_file |
| test.c |
test.c |
mit AND custom |
custom.txt |
Current behavior
If no --fetch-license is used, following is the generated ABOUT file
about_resource: test.c
name: test.c
license_expression: mit AND custom
licenses:
- file: custom.txt
Note that the license_key (mit, custom) are missing in the "licenses" section.
If --fetch-license is used, the generated ABOUT file will look like the following:
about_resource: test.c
name: test.c
license_expression: mit AND custom
licenses:
- key: mit
name: MIT License
file: mit.LICENSE
url: https://scancode-licensedb.aboutcode.org/mit.LICENSE
spdx_license_key: MIT
- key: custom
Note that the value of the license_file is not shown in both case.
The correct/ideal ABOUT files should look like
about_resource: test.c
name: test.c
license_expression: mit AND custom
licenses:
- key: mit
name: mit
- key: custom
name: custom
- file: custom.txt
about_resource: test.c
name: test.c
license_expression: mit AND custom
licenses:
- key: mit
name: MIT License
file: mit.LICENSE
url: https://scancode-licensedb.aboutcode.org/mit.LICENSE
spdx_license_key: MIT
- key: custom
name: custom
file: custom.txt
Please note that in the first scenario, the file "custom.txt" is not associated with any specific license key because there are two license keys but only one license file. Therefore, the tool is unable to determine which license key the file corresponds to. In the second scenario, the "--fetch-license" option has already assigned the license file to the "MIT" license key. As a result, there is only one remaining "unhandled" license key and one license file, allowing the tool to associate them together.
Assuming this is the input:
Current behavior
If no
--fetch-licenseis used, following is the generated ABOUT fileNote that the license_key (mit, custom) are missing in the "licenses" section.
If
--fetch-licenseis used, the generated ABOUT file will look like the following:Note that the value of the
license_fileis not shown in both case.The correct/ideal ABOUT files should look like
Please note that in the first scenario, the file "custom.txt" is not associated with any specific license key because there are two license keys but only one license file. Therefore, the tool is unable to determine which license key the file corresponds to. In the second scenario, the "--fetch-license" option has already assigned the license file to the "MIT" license key. As a result, there is only one remaining "unhandled" license key and one license file, allowing the tool to associate them together.