| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 import errno | 7 import errno |
| 8 import optparse | 8 import optparse |
| 9 import os | 9 import os |
| 10 import shutil | 10 import shutil |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 MakeDir(buildroot, parents=True) | 57 MakeDir(buildroot, parents=True) |
| 58 RunCommand(['repo', 'init', '-u', 'http://src.chromium.org/git/manifest'], | 58 RunCommand(['repo', 'init', '-u', 'http://src.chromium.org/git/manifest'], |
| 59 cwd=buildroot, input='\n\ny\n') | 59 cwd=buildroot, input='\n\ny\n') |
| 60 RunCommand(['repo', 'sync'], cwd=buildroot) | 60 RunCommand(['repo', 'sync'], cwd=buildroot) |
| 61 RunCommand(['repo', 'forall', '-c', 'git', 'config', | 61 RunCommand(['repo', 'forall', '-c', 'git', 'config', |
| 62 'url.ssh://git@gitrw.chromium.org:9222.pushinsteadof', | 62 'url.ssh://git@gitrw.chromium.org:9222.pushinsteadof', |
| 63 'http://src.chromium.org/git'], cwd=buildroot) | 63 'http://src.chromium.org/git'], cwd=buildroot) |
| 64 | 64 |
| 65 def _IncrementalCheckout(buildroot): | 65 def _IncrementalCheckout(buildroot): |
| 66 RunCommand(['repo', 'sync'], cwd=buildroot) | 66 RunCommand(['repo', 'sync'], cwd=buildroot) |
| 67 # Always re-run in case of new git repos or repo sync |
| 68 # failed in a previous run because of a forced Stop Build. |
| 69 RunCommand(['repo', 'forall', '-c', 'git', 'config', |
| 70 'url.ssh://git@gitrw.chromium.org:9222.pushinsteadof', |
| 71 'http://src.chromium.org/git'], cwd=buildroot) |
| 67 | 72 |
| 68 def _MakeChroot(buildroot): | 73 def _MakeChroot(buildroot): |
| 69 cwd = os.path.join(buildroot, 'src', 'scripts') | 74 cwd = os.path.join(buildroot, 'src', 'scripts') |
| 70 RunCommand(['./make_chroot', '--fast'], cwd=cwd) | 75 RunCommand(['./make_chroot', '--fast'], cwd=cwd) |
| 71 | 76 |
| 72 def _SetupBoard(buildroot, board='x86-generic'): | 77 def _SetupBoard(buildroot, board='x86-generic'): |
| 73 cwd = os.path.join(buildroot, 'src', 'scripts') | 78 cwd = os.path.join(buildroot, 'src', 'scripts') |
| 74 RunCommand(['./setup_board', '--fast', '--default', '--board=%s' % board], | 79 RunCommand(['./setup_board', '--fast', '--default', '--board=%s' % board], |
| 75 cwd=cwd) | 80 cwd=cwd) |
| 76 | 81 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 if buildconfig['uprev']: | 146 if buildconfig['uprev']: |
| 142 _UprevPush(buildroot) | 147 _UprevPush(buildroot) |
| 143 _UprevCleanup(buildroot) | 148 _UprevCleanup(buildroot) |
| 144 except: | 149 except: |
| 145 # something went wrong, cleanup (being paranoid) for next build | 150 # something went wrong, cleanup (being paranoid) for next build |
| 146 RunCommand(['sudo', 'rm', '-rf', buildroot]) | 151 RunCommand(['sudo', 'rm', '-rf', buildroot]) |
| 147 raise | 152 raise |
| 148 | 153 |
| 149 if __name__ == '__main__': | 154 if __name__ == '__main__': |
| 150 main() | 155 main() |
| OLD | NEW |