amaechler commented on code in PR #20764:
URL: https://github.com/apache/druid/pull/20764#discussion_r4403237141
##########
distribution/bin/check-licenses.py:
##########
@@ -212,20 +216,17 @@ def set_attr(self, data):
raise Exception("Unknown attr_index [{}]".format(self.attr_index))
def set_license(self, data):
- if data.upper().find("GPL") < 0:
- # Check if the license assosciated with the component is acccepted
- # set_license() will pick the first acceptable license
- # this fixes issue where a multi-licensed component
- # could override accepted license with not accepted one
- # e.g., EPL / GPL for logback-core
- if self.license not in self.compatible_license_names:
- try:
- self.license = self.compatible_license_names[data]
- except KeyError:
- print("Unsupported license: " + data)
- print("For:" + self.group_id + " " + self.artifact_id +
" in: "+ self.druid_module_name)
- else:
- print(self.group_id + " " + self.artifact_id + " in: " +
self.druid_module_name + " with: " + self.license + " ignoring " + data)
+ # Licenses are separated by ", ", which arrives as its own text
between linked license names.
Review Comment:
nit: in the reports `generate-license-dependency-reports.py` produces today
(maven-project-info-reports-plugin 3.9.0), multiple licenses come out as
adjacent links with no text between them, e.g. `<a ...>CDDL 1.1</a><a ...>GPL2
w/ CPE</a>` for jersey-core. The guard is harmless, but the comment doesn't
match what the parser sees:
```suggestion
# Skip separator text between license names, in case a report puts
", " between the links.
```
Could `parse_report` also go back to `"".join` so the multi-license tests
use the real shape, with `test_separators_are_not_license_names` passing the ",
" explicitly?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]