• Home
  • Raw
  • Download

Lines Matching +full:packages +full:- +full:dir

3 # Use of this source code is governed by a BSD-style license that can be
28 get_upstream_patch --chromeos_path ~/chromiumos --platform chromiumos \
29 --sha 1234567 --sha 890abdc
34 """A ValueError that highlights the cherry-pick has been seen before"""
38 """A ValueError that highlights the cherry-pick is before the start_sha"""
49 subprocess.run(["git", "-C", llvm_dir, "checkout", start_sha], check=True)
102 CherrypickError: A ValueError that highlights the cherry-pick has been
124 with open(patches_json_path, encoding="utf-8") as f:
138 "Similarly-named patch already exists in PATCHES.json: %r",
145 # LLVM. This is because some packages are built with LLVM ebuild on X86
146 # but not on the other architectures. e.g. compiler-rt. Therefore
153 ["git", "log", "-n1", "--format=%s", sha],
155 encoding="utf-8",
181 with open(temp_file, "w", encoding="utf-8") as f:
194 def resolve_llvm_ref(llvm_dir: t.Union[Path, str], sha: str) -> str:
196 ["git", "rev-parse", sha],
197 encoding="utf-8",
203 def project_to_package(project: str) -> str:
205 return "llvm-libunwind"
210 def package_to_project(package: str) -> str:
211 if package == "llvm-libunwind":
217 def get_package_names(sha: str, llvm_dir: t.Union[Path, str]) -> list:
219 ["git", "show", "--name-only", "--format=", sha],
221 encoding="utf-8",
225 packages = {"llvm"}
226 # Detect if there are more packages to apply the patch to
229 if package in ("compiler-rt", "libcxx", "libcxxabi", "llvm-libunwind"):
230 packages.add(package)
231 return list(sorted(packages))
235 packages: t.List[str],
244 for package, symlink in zip(packages, symlinks):
270 subprocess.check_output(["git", "add", "--all"], cwd=llvm_symlink_dir)
276 def resolve_symbolic_sha(start_sha: str, chromeos_path: Path) -> str:
280 if start_sha == "llvm-next":
314 f'get-upstream-{datetime.datetime.now().strftime("%Y%m%d%H%M%S%f")}'
324 packages = get_package_names(parsed_patch.sha, llvm_config.dir)
325 # Find out the ebuild of the corresponding ChromeOS packages
329 "sys-devel/llvm" if package == "llvm" else "sys-libs/" + package
330 for package in packages
339 packages,
344 llvm_config.dir,
361 ["git", "log", "-n1", "--oneline", parsed_patch.sha],
362 cwd=llvm_config.dir,
363 encoding="utf-8",
370 ["git", "reset", "--hard", "HEAD^"], cwd=llvm_config.dir
402 def git_msg(self) -> str:
410 ) -> ParsedPatch:
415 skip_dependencies: Pass --skip-dependecies for to `arc`
422 # git hash should only have lower-case letters
429 "--nobranch",
430 "--skip-dependencies" if skip_dependencies else "--revision",
433 cwd=llvm_config.dir,
435 sha = resolve_llvm_ref(llvm_config.dir, "HEAD")
438 sha = resolve_llvm_ref(llvm_config.dir, patch)
447 ) -> t.List[t.Tuple[ParsedPatch, ParsedPatch]]:
470 chroot.GetChrootEbuildPaths(chromeos_path, ["sys-devel/llvm"]),
475 ["git", "status", "-s"], cwd=llvm_symlink_dir, encoding="utf-8"
486 remote="origin", dir=get_llvm_hash.GetAndUpdateLLVMProjectInLLVMTools()
488 start_sha = resolve_llvm_ref(llvm_config.dir, start_sha)
521 "--chromeos_path",
526 "--start_sha",
527 default="llvm-next",
529 'specify "llvm" or "llvm-next", as well. Defaults to %(default)s.',
532 "--sha",
535 help="The LLVM git SHA to cherry-pick.",
538 "--differential",
542 " Cannot be used for changes already merged upstream; use --sha"
546 "--platform",
554 "--allow_failures",
559 "--create_cl",
564 "--skip_dependencies",
567 "when --differential appears exactly once.",
573 parser.error("--sha or --differential required")
577 "--skip_dependencies is only valid when there's exactly one "