cronet import: set gclient --delete_unversioned_trees

This option deletes gclient dependencies that were remove upstream, so
it makes sense to always set this flag for the import (since the import
directoy is reused to speed up the process).

This change also fixes setup_folder_origin to run in a subshell to
contain the directory change it performs.

Test: none
Change-Id: I87c60690be81843c3947acc0251967372ed4c34a
This commit is contained in:
Patrick Rohr
2023-03-24 06:52:17 -07:00
parent 2bbe771ceb
commit 538dd3e875

View File

@@ -55,7 +55,7 @@ setup_upstream_import_branch() {
# Arguments:
# new_rev, string
#######################################
setup_folder_origin() {
setup_folder_origin() (
local _new_rev=$1
mkdir -p "${COPYBARA_FOLDER_ORIGIN}"
cd "${COPYBARA_FOLDER_ORIGIN}"
@@ -83,9 +83,10 @@ EOF
cd src
# Set appropriate gclient flags to speed up syncing.
gclient sync \
--no-history
--shallow
}
--no-history \
--shallow \
--delete_unversioned_trees
)
#######################################
# Runs the copybara import of Chromium