diff options
author | mnaganov@chromium.org <mnaganov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-15 13:21:15 +0000 |
---|---|---|
committer | mnaganov@chromium.org <mnaganov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-15 13:21:15 +0000 |
commit | ebdeb5bebd42273d6eddb3fadf35fb16707f78b7 (patch) | |
tree | f0b76e590e5ce1958a15f80450095eb4073fca96 | |
parent | 718d8e15439a690842ca70480ed4bd42ba445784 (diff) | |
download | chromium_src-ebdeb5bebd42273d6eddb3fadf35fb16707f78b7.zip chromium_src-ebdeb5bebd42273d6eddb3fadf35fb16707f78b7.tar.gz chromium_src-ebdeb5bebd42273d6eddb3fadf35fb16707f78b7.tar.bz2 |
Mark third_party/usb_ids as a known issue for the android_webview license checker
R=joth@chromium.org,torne@chromium.org
BUG=161021
Review URL: https://codereview.chromium.org/11410095
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167912 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | android_webview/tools/known_issues.py (renamed from android_webview/tools/known_incompatible.py) | 7 | ||||
-rw-r--r-- | android_webview/tools/third_party_files_whitelist.txt | 2 | ||||
-rwxr-xr-x | android_webview/tools/webview_licenses.py | 12 |
3 files changed, 17 insertions, 4 deletions
diff --git a/android_webview/tools/known_incompatible.py b/android_webview/tools/known_issues.py index 5e6dcf9..2655260 100644 --- a/android_webview/tools/known_incompatible.py +++ b/android_webview/tools/known_issues.py @@ -18,6 +18,10 @@ process will stop and this list must be updated. """ +KNOWN_ISSUES = { + 'third_party/usb_ids', # crbug.com/161021, doesn't have a LICENSE file +} + KNOWN_INCOMPATIBLE = { # Incompatible code in the main chromium repository. '.': [ @@ -42,3 +46,6 @@ KNOWN_INCOMPATIBLE = { 'source/data/brkitr', ], } + +for directory in KNOWN_ISSUES: + KNOWN_INCOMPATIBLE['.'].append(directory) diff --git a/android_webview/tools/third_party_files_whitelist.txt b/android_webview/tools/third_party_files_whitelist.txt index b8cd305..e7a93b4 100644 --- a/android_webview/tools/third_party_files_whitelist.txt +++ b/android_webview/tools/third_party_files_whitelist.txt @@ -325,5 +325,3 @@ webkit/tools/test_shell/resources/test_shell.rc # String "Copyright" used in comments. cc/copyfiles.py webkit/compositor_bindings/copyfiles.py -# String LegalCopyright used in file. -win8/delegate_execute/delegate_execute.rc diff --git a/android_webview/tools/webview_licenses.py b/android_webview/tools/webview_licenses.py index 8293862..07515ca 100755 --- a/android_webview/tools/webview_licenses.py +++ b/android_webview/tools/webview_licenses.py @@ -30,6 +30,7 @@ REPOSITORY_ROOT = os.path.abspath(os.path.join( sys.path.append(os.path.join(REPOSITORY_ROOT, 'tools')) import licenses +import known_issues def GetIncompatibleDirectories(): """Gets a list of third-party directories which use licenses incompatible @@ -53,6 +54,9 @@ def GetIncompatibleDirectories(): regex = '^(%s)$' % '|'.join(whitelist) result = [] for directory in _FindThirdPartyDirs(): + if directory in known_issues.KNOWN_ISSUES: + result.append(directory) + continue metadata = licenses.ParseDir(directory, REPOSITORY_ROOT, require_license_file=False) if metadata.get('License Android Compatible', 'no') == 'yes': @@ -168,6 +172,9 @@ def _FindThirdPartyDirs(): The list of third-party directories. """ + # Please don't add here paths that have problems with license files, + # as they will end up included in Android WebView snapshot. + # Instead, add them into known_issues.py. prune_paths = [ # Placeholder directory, no third-party code. os.path.join('third_party', 'adobe'), @@ -198,8 +205,9 @@ def _Scan(): try: licenses.ParseDir(path, REPOSITORY_ROOT) except licenses.LicenseError, e: - print 'Got LicenseError "%s" while scanning %s' % (e, path) - all_licenses_valid = False + if not (path in known_issues.KNOWN_ISSUES): + print 'Got LicenseError "%s" while scanning %s' % (e, path) + all_licenses_valid = False # Second, check for non-standard license text. files_data = _ReadFile(os.path.join('android_webview', 'tools', |