Merge changes I11d77e8a,Id988da4f,I51735fdb,I3df00ebf

* changes:
  cronet import: only clone repository if it doesn't already exist
  cronet import: use aosp/upstream-import branch
  cronet import: remove zlib from import
  cronet import: add url/third_party/mozilla
This commit is contained in:
Patrick Rohr
2023-03-21 14:17:16 +00:00
committed by Gerrit Code Review
2 changed files with 12 additions and 7 deletions

View File

@@ -97,7 +97,9 @@ cronet_origin_files = glob(
"third_party/protobuf/**",
# Note: Only used for tests.
"third_party/quic_trace/**",
"third_party/zlib/**",
# Note: Cronet currently uses Android's zlib
# "third_party/zlib/**",
"url/third_party/mozilla/**",
],
exclude = common_excludes,
)

View File

@@ -36,7 +36,7 @@ EOF
COPYBARA_FOLDER_ORIGIN="/tmp/copybara-origin"
#######################################
# Create upstream-import branch in external/cronet.
# Create local upstream-import branch in external/cronet.
# Globals:
# ANDROID_BUILD_TOP
# Arguments:
@@ -44,10 +44,8 @@ COPYBARA_FOLDER_ORIGIN="/tmp/copybara-origin"
#######################################
setup_upstream_import_branch() {
local git_dir="${ANDROID_BUILD_TOP}/external/cronet"
local initial_empty_repo_sha="d1add53d6e90815f363c91d433735556ce79b0d2"
# Suppress error message if branch already exists.
(cd "${git_dir}" && git branch upstream-import "${initial_empty_repo_sha}") 2>/dev/null
(cd "${git_dir}" && git fetch aosp upstream-import:upstream-import)
}
#######################################
@@ -62,8 +60,13 @@ setup_folder_origin() {
mkdir -p "${COPYBARA_FOLDER_ORIGIN}"
cd "${COPYBARA_FOLDER_ORIGIN}"
# For this to work _new_rev must be a branch or a tag.
git clone --depth=1 --branch "${_new_rev}" https://chromium.googlesource.com/chromium/src.git
if [ -d src ]; then
(cd src && git fetch --tags && git checkout "${_new_rev}")
else
# For this to work _new_rev must be a branch or a tag.
git clone --depth=1 --branch "${_new_rev}" https://chromium.googlesource.com/chromium/src.git
fi
cat <<EOF >.gclient
solutions = [