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

Side by Side Diff: bin/cbuildbot.py

Issue 3171032: Fix bug with git packages with no matching ebuild. (Closed) Base URL: http://git.chromium.org/git/crosutils.git
Patch Set: Created 10 years, 4 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 | « no previous file | no next file » | 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 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 """CBuildbot is wrapper around the build process used by the pre-flight queue""" 7 """CBuildbot is wrapper around the build process used by the pre-flight queue"""
8 8
9 import errno 9 import errno
10 import optparse 10 import optparse
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 192
193 """ 193 """
194 # Using a dictionary removes duplicates. 194 # Using a dictionary removes duplicates.
195 revisions = {} 195 revisions = {}
196 for revision in revision_string.split(): 196 for revision in revision_string.split():
197 # Format 'package@commit-id'. 197 # Format 'package@commit-id'.
198 revision_tuple = revision.split('@') 198 revision_tuple = revision.split('@')
199 if len(revision_tuple) != 2: 199 if len(revision_tuple) != 2:
200 print >> sys.stderr, 'Incorrectly formatted revision %s' % revision 200 print >> sys.stderr, 'Incorrectly formatted revision %s' % revision
201 repo_name = revision_tuple[0].replace('.git', '') 201 repo_name = revision_tuple[0].replace('.git', '')
202 # May be many corresponding packages to a given git repo e.g. kernel) 202 # Might not have entry if no matching ebuild.
203 for package in repo_dictionary[repo_name]: 203 if repo_dictionary.has_key(repo_name):
204 revisions[package] = revision_tuple[1] 204 # May be many corresponding packages to a given git repo e.g. kernel).
205 for package in repo_dictionary[repo_name]:
206 revisions[package] = revision_tuple[1]
205 return revisions.items() 207 return revisions.items()
206 208
207 209
208 def _UprevFromRevisionList(buildroot, revision_list): 210 def _UprevFromRevisionList(buildroot, revision_list):
209 """Uprevs based on revision list.""" 211 """Uprevs based on revision list."""
210 package_str = '' 212 package_str = ''
211 commit_str = '' 213 commit_str = ''
212 for package, revision in revision_list: 214 for package, revision in revision_list:
213 package_str += package + ' ' 215 package_str += package + ' '
214 commit_str += revision + ' ' 216 commit_str += revision + ' '
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 _UprevCleanup(buildroot) 377 _UprevCleanup(buildroot)
376 except: 378 except:
377 # something went wrong, cleanup (being paranoid) for next build 379 # something went wrong, cleanup (being paranoid) for next build
378 if clobber: 380 if clobber:
379 RunCommand(['sudo', 'rm', '-rf', buildroot], print_cmd=False) 381 RunCommand(['sudo', 'rm', '-rf', buildroot], print_cmd=False)
380 raise 382 raise
381 383
382 384
383 if __name__ == '__main__': 385 if __name__ == '__main__':
384 main() 386 main()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698