diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-25 19:10:52 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-25 19:10:52 +0000 |
commit | 73210d52e63841d12b9551243b5988462ad3c8c5 (patch) | |
tree | 2c15ad4d05bfcf658bd061d563b1b685aa6be893 /tools/licenses.py | |
parent | ddecaf488bb8630bccaa208040b8cb602b712002 (diff) | |
download | chromium_src-73210d52e63841d12b9551243b5988462ad3c8c5.zip chromium_src-73210d52e63841d12b9551243b5988462ad3c8c5.tar.gz chromium_src-73210d52e63841d12b9551243b5988462ad3c8c5.tar.bz2 |
Revert "Revert 208509 "Prevent more licenses.py regressions.""
> This breaks local builds.
>
> > 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
>
> TBR=phajdan.jr@chromium.org
>
> Review URL: https://codereview.chromium.org/17711002
BUG=39240
Review URL: https://codereview.chromium.org/17724002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208534 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. -->" |