sync_chrome: Allow skipping the chromium git cache.
Continuous integration builders currently set up a git cache for the
chromium repository, which can't not be updated by a package within the
CrOS chroot. cbuildbot indeed updates the git cache outside the CrOS
chroot during the SyncChrome phase. However, a package may need to check
out a different revision of chromium source code, which is not possible
due to the git cache setup.
This CL extends sync_chrome to accept an optional flag to skip using the
git cache (on continuous-integration builders).
BUG=chromium:457486
TEST=Trybot runs on paladin, release, and chromiumos-sdk builders.
TEST=Manually test `sync_chrome --skip_cache`.
Change-Id: Ia2f4ce38d2070636cca3e40d9b2a32908749a136
Reviewed-on: https://chromium-review.googlesource.com/251648
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
diff --git a/scripts/sync_chrome.py b/scripts/sync_chrome.py
index 707e5d5..a9028f2 100644
--- a/scripts/sync_chrome.py
+++ b/scripts/sync_chrome.py
@@ -33,6 +33,8 @@
parser.add_argument('--gclient', help=commandline.argparse.SUPPRESS,
default=None)
parser.add_argument('--gclient_template', help='Template gclient input file')
+ parser.add_argument('--skip_cache', help='Skip using git cache',
+ dest='use_cache', action='store_false')
parser.add_argument('chrome_root', help='Directory to sync chrome in')
return parser
@@ -59,7 +61,7 @@
# Sync new Chrome.
gclient.WriteConfigFile(gclient_path, options.chrome_root,
options.internal, options.version,
- options.gclient_template)
+ options.gclient_template, options.use_cache)
sync_fn = functools.partial(
gclient.Sync, gclient_path, options.chrome_root, reset=options.reset)