diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-25 16:51:48 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-25 16:51:48 +0000 |
commit | 8bbaeb2a89c017617999aa02351f7660ba33ffb5 (patch) | |
tree | 02109550ea01a2193d139ee4bdb84dc4cc0c548f /tools/licenses.py | |
parent | eb9aa68d41746435c1c6287ca5cf1ac8cd365f67 (diff) | |
download | chromium_src-8bbaeb2a89c017617999aa02351f7660ba33ffb5.zip chromium_src-8bbaeb2a89c017617999aa02351f7660ba33ffb5.tar.gz chromium_src-8bbaeb2a89c017617999aa02351f7660ba33ffb5.tar.bz2 |
Prevent more licenses.py regressions.
This will allow me to fix the existing ones without
people adding even more.
BUG=39240
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/17247005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208509 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/licenses.py')
-rwxr-xr-x | tools/licenses.py | 45 |
1 files changed, 43 insertions, 2 deletions
diff --git a/tools/licenses.py b/tools/licenses.py index 4b4a400..d6c3652 100755 --- a/tools/licenses.py +++ b/tools/licenses.py @@ -235,6 +235,39 @@ SPECIAL_CASES = { }, } + +# List of paths we know are broken. It is temporary to prevent adding new +# libraries without info while the existing cases are fixed. +# +# DO NOT ADD NEW ENTRIES - instead make your library pass the check. +# +# TODO(phajdan.jr): Get this down to zero, http://crbug.com/39240 . +KNOWN_BROKEN_PATHS = [ + 'native_client', + 'sandbox/linux/seccomp-legacy', + 'third_party/accessibility-developer-tools', + 'third_party/amd', + 'third_party/bidichecker', + 'third_party/cros_dbus_cplusplus', + 'third_party/gles2_conform', + 'third_party/guava', + 'third_party/icon_family', + 'third_party/jsr-305', + 'third_party/leveldatabase', + 'third_party/libexif', + 'third_party/platformsdk_win8', + 'third_party/pymox', + 'third_party/safe_browsing', + 'third_party/snappy', + 'third_party/yasm', + 'tools/cc-frame-viewer/third_party/gl-matrix', + 'tools/cc-frame-viewer/third_party/py-chrome-app', + 'tools/page_cycler/acid3', + 'v8', + 'v8/strongtalk', +] + + # Special value for 'License File' field used to indicate that the license file # should not be used in about:credits. NOT_SHIPPED = "NOT_SHIPPED" @@ -427,11 +460,14 @@ def GenerateCredits(): entry_template = open(os.path.join(root, 'chrome', 'browser', 'resources', 'about_credits_entry.tmpl'), 'rb').read() entries = [] + errors = [] for path in sorted(third_party_dirs): try: metadata = ParseDir(path, root) - except LicenseError: - # TODO(phajdan.jr): Convert to fatal error (http://crbug.com/39240). + except LicenseError, e: + # TODO(phajdan.jr): Make this always fatal (http://crbug.com/39240). + if path.replace('\\', '/') not in KNOWN_BROKEN_PATHS: + errors.append((path, e.args[0])) continue if metadata['License File'] == NOT_SHIPPED: continue @@ -446,6 +482,11 @@ def GenerateCredits(): env["license_unescaped"] = required_text entries.append(EvaluateTemplate(entry_template, env)) + if errors: + for path, error in sorted(errors): + print path + ": " + error + return False + file_template = open(os.path.join(root, 'chrome', 'browser', 'resources', 'about_credits.tmpl'), 'rb').read() template_contents = "<!-- Generated by licenses.py; do not edit. -->" |