parameters: ()
docstring: Patch the Chromium DEPS file if necessary.
docstring_summary: Patch the Chromium DEPS file if necessary.
docstring_tokens: Patch the Chromium DEPS file if necessary .
function: def apply_deps_patch():
    """ Patch the Chromium DEPS file if necessary. """
    # Starting with 43.0.2357.126 the DEPS file is now 100% Git and the .DEPS.git
    # file is no longer created. Look for the older file first in case we're
    # building an older branch version.
    deps_file = '.DEPS.git'
    deps_path = os.path.join(chromium_src_dir, deps_file)
    if not os.path.isfile(deps_path):
      deps_file = 'DEPS'
      deps_path = os.path.join(chromium_src_dir, deps_file)
  
    if os.path.isfile(deps_path):
      msg("Chromium DEPS file: %s" % (deps_path))
      patch_file = os.path.join(cef_dir, 'patch', 'patches', deps_file + '.patch')
      if os.path.exists(patch_file):
        # Attempt to apply the DEPS patch file that may exist with newer branches.
        patch_tool = os.path.join(cef_dir, 'tools', 'patcher.py')
        run('%s %s --patch-file "%s" --patch-dir "%s"' %
                (python_exe, patch_tool, patch_file, chromium_src_dir),
            chromium_src_dir, depot_tools_dir)
      elif cef_branch != 'trunk' and int(cef_branch) <= 1916:
        # Release branch DEPS files older than 37.0.2007.0 may include a 'src'
        # entry. This entry needs to be removed otherwise `gclient sync` will
        # fail.
        remove_deps_entry(deps_path, "'src'")
    else:
      raise Exception("Path does not exist: %s" % (deps_path))
function_tokens: def apply_deps_patch ( ) : # Starting with 43.0.2357.126 the DEPS file is now 100% Git and the .DEPS.git # file is no longer created. Look for the older file first in case we're # building an older branch version. deps_file = '.DEPS.git' deps_path = os . path . join ( chromium_src_dir , deps_file ) if not os . path . isfile ( deps_path ) : deps_file = 'DEPS' deps_path = os . path . join ( chromium_src_dir , deps_file ) if os . path . isfile ( deps_path ) : msg ( "Chromium DEPS file: %s" % ( deps_path ) ) patch_file = os . path . join ( cef_dir , 'patch' , 'patches' , deps_file + '.patch' ) if os . path . exists ( patch_file ) : # Attempt to apply the DEPS patch file that may exist with newer branches. patch_tool = os . path . join ( cef_dir , 'tools' , 'patcher.py' ) run ( '%s %s --patch-file "%s" --patch-dir "%s"' % ( python_exe , patch_tool , patch_file , chromium_src_dir ) , chromium_src_dir , depot_tools_dir ) elif cef_branch != 'trunk' and int ( cef_branch ) <= 1916 : # Release branch DEPS files older than 37.0.2007.0 may include a 'src' # entry. This entry needs to be removed otherwise `gclient sync` will # fail. remove_deps_entry ( deps_path , "'src'" ) else : raise Exception ( "Path does not exist: %s" % ( deps_path ) )