Lines Matching +full:0 +full:- +full:all +full:- +full:deps
2 # Copyright 2019 The ANGLE project authors. All Rights Reserved.
4 # Use of this source code is governed by a BSD-style license
7 # in the file PATENTS. All contributing project authors may
13 """Script to automatically roll Chromium dependencies in the ANGLE DEPS file."""
39 'third_party/abseil-cpp',
54 'third_party/clang-format/script',
59 'third_party/fuchsia-sdk/sdk',
74 'third_party/Python-Markdown',
75 'third_party/qemu-linux-x64',
76 'third_party/qemu-mac-x64',
86 'tools/luci-go',
106 COMMIT_POSITION_RE = re.compile('^Cr-Commit-Position: .*#([0-9]+).*$')
107 CLANG_REVISION_RE = re.compile(r'^CLANG_REVISION = \'([-0-9a-z]+)\'')
117 # Location of automically gathered android deps.
120 NOTIFY_EMAIL = 'angle-wrangler@grotations.appspotmail.com'
182 sys.exit(-1)
189 If the command fails (exit code != 0), the function will exit the process.
198 assert all(isinstance(value, str) for value in extra_env.values())
212 if not ignore_exit_code and p.returncode != 0:
224 list of all branches.
226 lines = _RunCommand(['git', 'branch'])[0].split('\n')
246 return base64.b64decode(base64_content[0]).decode('utf-8')
277 """Gets all deps entries matching the provided path.
281 'src/testing/gtest' and 'src/testing/gmock' deps entries for Chromium's DEPS.
294 if all(part == parts[i] for i, part in enumerate(dir_path.split('/'))):
300 """Builds a dict of paths to DepsEntry objects from a raw parsed deps dict."""
317 AddDepsEntries(deps_dict['deps'])
326 'and remove/add entries in DEPS so the old and new '
341 return [path for path in new_entries - old_entries if path in ANGLE_CHROMIUM_DEPS]
346 Calculate changed deps entries based on entries defined in the ANGLE DEPS
348 - If a shared dependency with the Chromium DEPS file: roll it to the same
350 - If it's a Chromium sub-directory, roll it to the HEAD revision (notice
353 - If it's another DEPS entry (not shared with Chromium), roll it to HEAD
357 A list of ChangedDep objects representing the changed deps.
362 # This is a hack to get around the unsupported way this script parses DEPS.
363 # A better fix would be to use the gclient APIs to query and update DEPS.
364 # However this is complicated by how this script downloads DEPS remotely.
374 # All ANGLE Chromium dependencies are located in src/.
387 # Use the revision from Chromium's DEPS file.
390 'ANGLE DEPS entry %s has a different URL (%s) than Chromium (%s).' %
394 # Use the HEAD of the deps repo.
395 stdout, _ = _RunCommand(['git', 'ls-remote', ChromeURL(angle_deps_entry), 'HEAD'])
396 new_rev = stdout.strip().split('\t')[0]
415 mirror_change = mirror_change[0]
445 current_cr_rev = rev_update.current_chromium_rev[0:10]
446 new_cr_rev = rev_update.new_chromium_rev[0:10]
459 def Section(adjective, deps): argument
460 noun = 'dependency' if len(deps) == 1 else 'dependencies'
472 (c.path, c.url, c.current_rev[0:10], c.new_rev[0:10]))
476 # in which chromium_revision is already modified in DEPS
478 change_url = CHROMIUM_FILE_TEMPLATE % (rev_interval, 'DEPS')
479 commit_msg.append('DEPS diff: %s\n' % change_url)
497 # TBR needs to be non-empty for Gerrit to process it.
499 working_dir=CHECKOUT_SRC_DIR)[0].splitlines()[0]
509 """Update the DEPS file with the new revision."""
512 deps_content = deps_file.read().decode('utf-8')
519 # Add and remove dependencies. For now: only generated android deps.
520 # Since gclient cannot add or remove deps, we rely on the fact that
521 # these android deps are located in one place to copy/paste.
528 'in %s DEPS' % (ANDROID_DEPS_START, ANDROID_DEPS_END, faulty))
530 replacement = new_deps.group(0).replace('src/third_party/android_deps',
538 deps_file.write(deps_content.encode('utf-8'))
540 # Update each individual DEPS entry.
542 # We don't sync deps on autoroller, so ignore missing local deps
547 'gclient sync --deps=all\n'
548 'or make sure the .gclient file for your solution contains all '
560 _RunCommand([gclient_cmd, 'setdep', '--revision', update], working_dir=CHECKOUT_SRC_DIR)
564 stdout, _ = _RunCommand(['git', 'status', '--porcelain'])
565 if len(stdout) == 0:
573 current_branch = _RunCommand(['git', 'rev-parse', '--abbrev-ref', 'HEAD'])[0].splitlines()[0]
575 logging.error('Please checkout the main branch and re-run this script.')
577 sys.exit(-1)
586 _RunCommand(['git', 'checkout', '-b', ROLL_BRANCH_NAME])
597 _RunCommand(['git', 'branch', '-D', ROLL_BRANCH_NAME])
603 _RunCommand(['git', 'add', '--update', '.'])
604 _RunCommand(['git', 'commit', '-m', commit_msg])
610 old_commit_msg = _RunCommand(['git', 'log', '-1', '--pretty=%B'])[0].strip()
614 if bug_index == -1:
617 sys.exit(-1)
620 _RunCommand(['git', 'commit', '-a', '--amend', '-m', new_commit_msg])
625 return 0
626 if (new_commit_pos - current_commit_pos) < cq_over:
635 - 2: Submit to commit queue.
636 - 1: Run trybots but do not submit to CQ.
637 - 0: Skip CQ, upload only.
639 cmd = ['git', 'cl', 'upload', '--force', '--bypass-hooks', '--send-mail']
640 cmd.extend(['--cc', NOTIFY_EMAIL])
643 cmd.extend(['--use-commit-queue'])
646 cmd.extend(['--cq-dry-run'])
659 stdout, _ = _RunCommand(['git', 'ls-remote', CHROMIUM_SRC_URL, 'HEAD'])
660 head_rev = stdout.strip().split('\t')[0]
670 '--clean',
675 '-r',
676 '--revision',
680 '--dry-run',
683 help=('Calculate changes and modify DEPS, but don\'t create '
687 '-i',
688 '--ignore-unclean-workdir',
695 '--skip-cq',
700 '--cq-over',
706 '--autoroll',
709 help='Autoroller mode - amend existing commit, '
712 '-v',
713 '--verbose',
724 # We don't have locally sync'ed deps on autoroller,
739 deps_filename = os.path.join(CHECKOUT_SRC_DIR, 'DEPS')
747 new_cr_content = ReadRemoteCrFile('DEPS', rev_update.new_chromium_rev)
766 logging.info("No DEPS changes detected, skipping CL creation.")
774 return 0