Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Side by Side Diff: win_toolchain/get_toolchain_if_necessary.py

Issue 173523005: Move data.json to win_toolchain to its abs paths aren't hashed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « .gitignore ('k') | win_toolchain/toolchain2013.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2013 The Chromium Authors. All rights reserved. 2 # Copyright 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Downloads and unpacks a toolchain for building on Windows. The contents are 6 """Downloads and unpacks a toolchain for building on Windows. The contents are
7 matched by sha1 which will be updated when the toolchain is updated. 7 matched by sha1 which will be updated when the toolchain is updated.
8 8
9 Having a toolchain script in depot_tools means that it's not versioned 9 Having a toolchain script in depot_tools means that it's not versioned
10 directly with the source code. That is, if the toolchain is upgraded, but 10 directly with the source code. That is, if the toolchain is upgraded, but
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 current_hash = CalculateHash(target_dir) 188 current_hash = CalculateHash(target_dir)
189 if current_hash not in desired_hashes: 189 if current_hash not in desired_hashes:
190 print >> sys.stderr, ( 190 print >> sys.stderr, (
191 'Got wrong hash after pulling a new toolchain. ' 191 'Got wrong hash after pulling a new toolchain. '
192 'Wanted one of \'%s\', got \'%s\'.' % ( 192 'Wanted one of \'%s\', got \'%s\'.' % (
193 desired_hashes, current_hash)) 193 desired_hashes, current_hash))
194 return 1 194 return 1
195 SaveTimestampsAndHash(target_dir, current_hash) 195 SaveTimestampsAndHash(target_dir, current_hash)
196 196
197 if options.output_json: 197 if options.output_json:
198 shutil.copyfile(os.path.join(target_dir, 'data.json'), options.output_json) 198 shutil.copyfile(os.path.join(target_dir, '..', 'data.json'),
199 options.output_json)
199 200
200 return 0 201 return 0
201 202
202 203
203 if __name__ == '__main__': 204 if __name__ == '__main__':
204 sys.exit(main()) 205 sys.exit(main())
OLDNEW
« no previous file with comments | « .gitignore ('k') | win_toolchain/toolchain2013.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698