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

Side by Side Diff: prebuilt.py

Issue 5542002: Switch from gsdview.appspot.com to commondatastorage.googleapis.com. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git@master
Patch Set: 80 chars Created 10 years 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 | « chromite/lib/binpkg.py ('k') | prebuilt_unittest.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/python 1 #!/usr/bin/python
2 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 2 # Copyright (c) 2010 The Chromium OS 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 import datetime 6 import datetime
7 import multiprocessing 7 import multiprocessing
8 import optparse 8 import optparse
9 import os 9 import os
10 import re 10 import re
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 _BOARD_PATH = 'chroot/build/%(board)s' 48 _BOARD_PATH = 'chroot/build/%(board)s'
49 _BOTO_CONFIG = '/home/chrome-bot/external-boto' 49 _BOTO_CONFIG = '/home/chrome-bot/external-boto'
50 # board/board-target/version/packages/' 50 # board/board-target/version/packages/'
51 _REL_BOARD_PATH = 'board/%(board)s/%(version)s/packages' 51 _REL_BOARD_PATH = 'board/%(board)s/%(version)s/packages'
52 # host/host-target/version/packages/' 52 # host/host-target/version/packages/'
53 _REL_HOST_PATH = 'host/%(target)s/%(version)s/packages' 53 _REL_HOST_PATH = 'host/%(target)s/%(version)s/packages'
54 # Private overlays to look at for builds to filter 54 # Private overlays to look at for builds to filter
55 # relative to build path 55 # relative to build path
56 _PRIVATE_OVERLAY_DIR = 'src/private-overlays' 56 _PRIVATE_OVERLAY_DIR = 'src/private-overlays'
57 _BINHOST_BASE_DIR = 'src/overlays' 57 _BINHOST_BASE_DIR = 'src/overlays'
58 #_BINHOST_BASE_URL = 'http://commondatastorage.googleapis.com/chromeos-prebuilt' 58 _BINHOST_BASE_URL = 'http://commondatastorage.googleapis.com/chromeos-prebuilt'
59 _BINHOST_BASE_URL = 'http://gsdview.appspot.com/chromeos-prebuilt'
60 _PREBUILT_BASE_DIR = 'src/third_party/chromiumos-overlay/chromeos/config/' 59 _PREBUILT_BASE_DIR = 'src/third_party/chromiumos-overlay/chromeos/config/'
61 # Created in the event of new host targets becoming available 60 # Created in the event of new host targets becoming available
62 _PREBUILT_MAKE_CONF = {'amd64': os.path.join(_PREBUILT_BASE_DIR, 61 _PREBUILT_MAKE_CONF = {'amd64': os.path.join(_PREBUILT_BASE_DIR,
63 'make.conf.amd64-host')} 62 'make.conf.amd64-host')}
64 _BINHOST_CONF_DIR = 'src/third_party/chromiumos-overlay/chromeos/binhost' 63 _BINHOST_CONF_DIR = 'src/third_party/chromiumos-overlay/chromeos/binhost'
65 64
66 65
67 class FiltersEmpty(Exception): 66 class FiltersEmpty(Exception):
68 """Raised when filters are used but none are found.""" 67 """Raised when filters are used but none are found."""
69 pass 68 pass
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 Args: 305 Args:
307 base_local_path: The base path to the files on the local hard drive. 306 base_local_path: The base path to the files on the local hard drive.
308 remote_path: The base path to the remote paths. 307 remote_path: The base path to the remote paths.
309 pkgs: The packages to upload. 308 pkgs: The packages to upload.
310 309
311 Returns: 310 Returns:
312 Returns a dictionary of local_path/remote_path pairs 311 Returns a dictionary of local_path/remote_path pairs
313 """ 312 """
314 upload_files = {} 313 upload_files = {}
315 for pkg in pkgs: 314 for pkg in pkgs:
316 suffix = pkg['CPV'] + '.tbz2' 315 suffix = pkg['CPV'] + '.tbz2'
diandersAtChromium 2010/12/02 23:03:21 Do you need to do escaping here?
317 local_path = os.path.join(base_local_path, suffix) 316 local_path = os.path.join(base_local_path, suffix)
318 assert os.path.exists(local_path) 317 assert os.path.exists(local_path)
319 remote_path = '%s/%s' % (base_remote_path.rstrip('/'), suffix) 318 remote_path = '%s/%s' % (base_remote_path.rstrip('/'), suffix)
320 upload_files[local_path] = remote_path 319 upload_files[local_path] = remote_path
321 320
322 return upload_files 321 return upload_files
323 322
324 323
325 def DetermineMakeConfFile(target): 324 def DetermineMakeConfFile(target):
326 """Determine the make.conf file that needs to be updated for prebuilts. 325 """Determine the make.conf file that needs to be updated for prebuilts.
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 if options.board: 532 if options.board:
534 UploadPrebuilt(options.build_path, options.upload, version, 533 UploadPrebuilt(options.build_path, options.upload, version,
535 options.binhost_base_url, board=options.board, 534 options.binhost_base_url, board=options.board,
536 git_sync=options.git_sync, key=options.key, 535 git_sync=options.git_sync, key=options.key,
537 pkg_indexes=pkg_indexes, 536 pkg_indexes=pkg_indexes,
538 sync_binhost_conf=options.sync_binhost_conf) 537 sync_binhost_conf=options.sync_binhost_conf)
539 538
540 539
541 if __name__ == '__main__': 540 if __name__ == '__main__':
542 main() 541 main()
OLDNEW
« no previous file with comments | « chromite/lib/binpkg.py ('k') | prebuilt_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698