From 80e45c41f32d37caf95520efe7ffde22b1fd2938 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 29 Aug 2014 13:05:30 +0000 Subject: [PATCH] Do not run unnecessary gyp hooks. --- script/bootstrap | 2 +- script/update | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/script/bootstrap b/script/bootstrap index 28c3756d..0843bdac 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -45,7 +45,7 @@ def main(): os.chdir(CHROMIUM_DIR) fetch = os.path.join(DEPOT_TOOLS_DIR, 'fetch.py') result = subprocess.call([sys.executable, fetch, 'chromium', - '--nosvn=True']) + '--nohooks', '--nosvn=True']) if result: return result; diff --git a/script/update b/script/update index 079e8eb4..75b70819 100755 --- a/script/update +++ b/script/update @@ -17,11 +17,11 @@ CHROMIUMCONTENT_DESTINATION_DIR = os.path.join(SRC_DIR, 'chromiumcontent') def main(): return (# Make sure we get all of the branches locally. - gclient_sync() or + gclient_sync(True) or # Update top-level checkout to the release tag. checkout_version() or # Update deps for current checkout. - gclient_sync() or + gclient_sync(False) or apply_patches() or copy_chromiumcontent_files() or run_gyp() or @@ -39,14 +39,14 @@ def checkout_version(): 'refs/tags/{0}'.format(chromium_version())]) -def gclient_sync(): +def gclient_sync(nohooks): os.chdir(SRC_DIR) gclient = os.path.join(DEPOT_TOOLS_DIR, 'gclient.py') - if subprocess.call([sys.executable, gclient, 'sync', '--with_branch_heads'], - env=gyp_env()) == 0: - return - return subprocess.call([sys.executable, gclient, 'sync', '--force', - '--with_branch_heads'], env=gyp_env()) + args = [sys.executable, gclient, 'sync', '--with_branch_heads'] + if nohooks: + args += ['--nohooks'] + if subprocess.call(args, env=gyp_env()): + return subprocess.call(args + ['--force'], env=gyp_env()) def gyp_env():