Support 'Refer to additional_readme_paths.json'

This is used by some README.chromium to reference transitive
dependencies, and is supported by licenses.py[0]

[0]
https://source.corp.google.com/h/chrome-internal/codesearch/chrome/src/+/main:tools/licenses/licenses.py;l=131-134

Bug: 398668341
Change-Id: Iac15b001614e7afa6eab981deaaf3d4aa5020d66
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6296123
Auto-Submit: Jordan Brown <rop@google.com>
Commit-Queue: Jordan Brown <rop@google.com>
Reviewed-by: Rachael Newitt <renewitt@google.com>
Commit-Queue: Rachael Newitt <renewitt@google.com>
changes/23/6296123/3
Jordan Brown 5 days ago committed by LUCI CQ
parent c994f00dee
commit ec894dd8c0

@ -202,6 +202,16 @@ WITH_PERMISSION_ONLY = frozenset([
# go/keep-sorted end
])
ALLOWED_LICENSES = ALLOWED_SPDX_LICENSES | EXTENDED_LICENSE_CLASSIFIERS
# These are references to files that are not licenses, but are allowed to be
# included in the LICENSE field.
ALLOWED_REFERENCES = frozenset([
"Refer to additional_readme_paths.json",
])
ALLOWED_LICENSES = (
ALLOWED_SPDX_LICENSES
| EXTENDED_LICENSE_CLASSIFIERS
| ALLOWED_REFERENCES
)
ALLOWED_OPEN_SOURCE_LICENSES = ALLOWED_LICENSES | OPEN_SOURCE_SPDX_LICENSES
ALL_LICENSES = ALLOWED_OPEN_SOURCE_LICENSES | WITH_PERMISSION_ONLY

@ -123,6 +123,7 @@ class FieldValidationTest(unittest.TestCase):
"MIT",
"APSL-2.0, MIT",
"APSL-2.0 ,MIT",
"Refer to additional_readme_paths.json"
],
error_values=[
"",
@ -136,6 +137,7 @@ class FieldValidationTest(unittest.TestCase):
warning_values=[
"Custom license",
"Custom, MIT",
"Refer to any_other_readme_paths.json",
],
)

Loading…
Cancel
Save