Patch the Chromium DEPS file if necessary.
()
| 402 | |
| 403 | |
| 404 | def apply_deps_patch(): |
| 405 | """ Patch the Chromium DEPS file if necessary. """ |
| 406 | # Starting with 43.0.2357.126 the DEPS file is now 100% Git and the .DEPS.git |
| 407 | # file is no longer created. Look for the older file first in case we're |
| 408 | # building an older branch version. |
| 409 | deps_file = '.DEPS.git' |
| 410 | deps_path = os.path.join(chromium_src_dir, deps_file) |
| 411 | if not os.path.isfile(deps_path): |
| 412 | deps_file = 'DEPS' |
| 413 | deps_path = os.path.join(chromium_src_dir, deps_file) |
| 414 | |
| 415 | if os.path.isfile(deps_path): |
| 416 | msg("Chromium DEPS file: %s" % (deps_path)) |
| 417 | patch_file = os.path.join(cef_dir, 'patch', 'patches', deps_file) |
| 418 | if os.path.exists(patch_file + ".patch"): |
| 419 | # Attempt to apply the DEPS patch file that may exist with newer branches. |
| 420 | patch_tool = os.path.join(cef_dir, 'tools', 'patcher.py') |
| 421 | run('%s %s --patch-file "%s" --patch-dir "%s"' % |
| 422 | (python_exe, patch_tool, patch_file, |
| 423 | chromium_src_dir), chromium_src_dir, depot_tools_dir) |
| 424 | elif cef_branch != 'trunk' and int(cef_branch) <= 1916: |
| 425 | # Release branch DEPS files older than 37.0.2007.0 may include a 'src' |
| 426 | # entry. This entry needs to be removed otherwise `gclient sync` will |
| 427 | # fail. |
| 428 | remove_deps_entry(deps_path, "'src'") |
| 429 | else: |
| 430 | raise Exception("Path does not exist: %s" % (deps_path)) |
| 431 | |
| 432 | |
| 433 | def run_patch_updater(args='', output_file=None): |
no test coverage detected