Use --gclientfile instead of --spec, because windows is THE WORST.
--spec contains newlines, which are interpreted as actual newlines in the command line, which causes gclient to fall apart at the seams. TBR=agable@chromium.org, kjellander@webrtc.org, szager@chromium.org BUG=2863, chromium:339647 Review URL: https://webrtc-codereview.appspot.com/22429004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6944 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -37,6 +37,7 @@
|
|||||||
/Makefile
|
/Makefile
|
||||||
/build
|
/build
|
||||||
/buildtools
|
/buildtools
|
||||||
|
/chromium/.gclient.bot
|
||||||
/chromium/.gclient_entries
|
/chromium/.gclient_entries
|
||||||
/chromium/.last_sync_chromium
|
/chromium/.last_sync_chromium
|
||||||
/chromium/src
|
/chromium/src
|
||||||
|
@@ -60,19 +60,22 @@ def main():
|
|||||||
args.append('-vvv')
|
args.append('-vvv')
|
||||||
|
|
||||||
if sys.platform.startswith('win'):
|
if sys.platform.startswith('win'):
|
||||||
cache_path = os.path.join(os.path.splitdrive(ROOT_DIR)[0],
|
cache_path = os.path.join(os.path.splitdrive(ROOT_DIR)[0] + os.path.sep,
|
||||||
'b', 'git-cache')
|
'b', 'git-cache')
|
||||||
else:
|
else:
|
||||||
cache_path = '/b/git-cache'
|
cache_path = '/b/git-cache'
|
||||||
|
|
||||||
with open(os.path.join(opts.chromium_dir, '.gclient'), 'rb') as spec:
|
gclientfile = os.path.join(opts.chromium_dir, '.gclient')
|
||||||
|
with open(gclientfile, 'rb') as spec:
|
||||||
spec = spec.read().splitlines()
|
spec = spec.read().splitlines()
|
||||||
spec[-1] = 'cache_dir = %r' % (cache_path,)
|
spec[-1] = 'cache_dir = %r' % (cache_path,)
|
||||||
args.append('--spec')
|
with open(gclientfile + '.bot', 'wb') as f:
|
||||||
args.append('\n'.join(spec))
|
f.write('\n'.join(spec))
|
||||||
args.append('--delete_unversioned_trees')
|
|
||||||
args.append('--reset')
|
args += [
|
||||||
args.append('--upstream')
|
'--gclientfile', '.gclient.bot',
|
||||||
|
'--delete_unversioned_trees', '--reset', '--upstream'
|
||||||
|
]
|
||||||
else:
|
else:
|
||||||
args.append('--no-history')
|
args.append('--no-history')
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user