aboutsummaryrefslogtreecommitdiff
path: root/infra/build_specified_commit.py
diff options
context:
space:
mode:
authorOliver Chang <oliverchang@users.noreply.github.com>2020-05-25 15:49:37 +1000
committerGitHub <noreply@github.com>2020-05-25 15:49:37 +1000
commit9ac361c149923fad3028a3444bddede9d5c96a9d (patch)
tree4dc74d0c9b897086c00dd38198d290c3352b0d5c /infra/build_specified_commit.py
parentdfa5a7976f1bfeedbddac27e71d80a6c840745ca (diff)
downloadoss-fuzz-9ac361c149923fad3028a3444bddede9d5c96a9d.tar.gz
build_specified_commit: revert to using cp. (#3871)
rsync seems to have disappeared in the latest images somehow, and we can't rely on it always existing.
Diffstat (limited to 'infra/build_specified_commit.py')
-rw-r--r--infra/build_specified_commit.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/infra/build_specified_commit.py b/infra/build_specified_commit.py
index 30a16774f..c9445e78c 100644
--- a/infra/build_specified_commit.py
+++ b/infra/build_specified_commit.py
@@ -22,6 +22,7 @@ import os
import collections
import logging
import re
+import shutil
import helper
import repo_manager
@@ -104,13 +105,17 @@ def copy_src_from_docker(project_name, host_dir):
"""Copy /src from docker to the host."""
# Copy /src to host.
image_name = 'gcr.io/oss-fuzz/' + project_name
+ src_dir = os.path.join(host_dir, 'src')
+ if os.path.exists(src_dir):
+ shutil.rmtree(src_dir, ignore_errors=True)
+
docker_args = [
'-v',
host_dir + ':/out',
image_name,
- 'rsync',
- '-aW',
- '--delete',
+ 'cp',
+ '-r',
+ '-p',
'/src',
'/out',
]
@@ -118,9 +123,7 @@ def copy_src_from_docker(project_name, host_dir):
# Submodules can have gitdir entries which point to absolute paths. Make them
# relative, as otherwise we can't do operations on the checkout on the host.
- src_dir = os.path.join(host_dir, 'src')
_make_gitdirs_relative(src_dir)
-
return src_dir