(self, src_path, dst_path)
| 514 | tar.add(dfile, recursive=False) |
| 515 | |
| 516 | def _copy_binary(self, src_path, dst_path): |
| 517 | log.debug("binary: %s -> %s", src_path, dst_path) |
| 518 | if self._ctx.strip_binaries: |
| 519 | log.debug("copy and strip: %s", dst_path) |
| 520 | shutil.copy2(src_path, dst_path) |
| 521 | output = _run(["file", str(dst_path)], capture_output=True, text=True) |
| 522 | if "ELF" in output.stdout: |
| 523 | _run(["strip", str(dst_path)]).check_returncode() |
| 524 | return |
| 525 | log.debug("hard linking: %s", dst_path) |
| 526 | try: |
| 527 | os.unlink(dst_path) |
| 528 | except FileNotFoundError: |
| 529 | pass |
| 530 | os.link(src_path, dst_path) |
| 531 | |
| 532 | def _bins_and_libs(self, prefix, bin_patterns, lib_patterns, exclude_prefixes=[]): |
| 533 | out = [] |
no test coverage detected