diff --git a/ddev/changelog.d/19566.fixed b/ddev/changelog.d/19566.fixed new file mode 100644 index 0000000000000..06f3cc7c337e8 --- /dev/null +++ b/ddev/changelog.d/19566.fixed @@ -0,0 +1 @@ +Validation error for unknown licenses says how to fix the validation. diff --git a/ddev/src/ddev/cli/validate/licenses.py b/ddev/src/ddev/cli/validate/licenses.py index 468e765f74a62..65a1e4742cbad 100644 --- a/ddev/src/ddev/cli/validate/licenses.py +++ b/ddev/src/ddev/cli/validate/licenses.py @@ -439,7 +439,14 @@ def licenses(app: Application, sync: bool): license_ids.add(known_spdx_licenses[normalized_license]) else: license_ids.add(expanded_license) - package_license_errors[package_name].append(f'unknown license: {expanded_license}') + package_license_errors[package_name].append( + 'Encountered unknown license. Options to fix this error:\n' + '- If it is truly a new license type, add it to exclusions ' + 'or known licenses in ddev/cli/validate/license_utils.py\n' + '- If it is known but formatted in a way that we cannot parse it, ' + 'hard-code a known version of it .ddev/config.toml\n\n' + f'Here is the license for reference:\n{expanded_license}' + ) for classifier in data['classifiers']: if classifier in licenses_utils.KNOWN_CLASSIFIERS: