MCPcopy Create free account
hub / github.com/cztomczak/cefpython / apply_deps_patch

Function apply_deps_patch

tools/automate-git.py:404–430  ·  view source on GitHub ↗

Patch the Chromium DEPS file if necessary.

()

Source from the content-addressed store, hash-verified

402
403
404def 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
433def run_patch_updater(args='', output_file=None):

Callers 1

automate-git.pyFile · 0.85

Calls 3

msgFunction · 0.85
runFunction · 0.85
remove_deps_entryFunction · 0.85

Tested by

no test coverage detected