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 """This module uprevs a given package's ebuild to the next revision.""" | 7 """This module uprevs a given package's ebuild to the next revision.""" |
8 | 8 |
9 | 9 |
10 import fileinput | 10 import fileinput |
11 import gflags | 11 import gflags |
12 import os | 12 import os |
13 import re | 13 import re |
14 import shutil | 14 import shutil |
15 import subprocess | 15 import subprocess |
16 import sys | 16 import sys |
17 | 17 |
18 sys.path.append(os.path.join(os.path.dirname(__file__), 'lib')) | 18 sys.path.append(os.path.join(os.path.dirname(__file__), 'lib')) |
19 from cros_build_lib import Info, RunCommand, Warning, Die | 19 from cros_build_lib import Info, RunCommand, Warning, Die |
20 | 20 |
21 | 21 |
22 gflags.DEFINE_string('board', 'x86-generic', | 22 gflags.DEFINE_string('board', '', |
23 'Board for which the package belongs.', short_name='b') | 23 'Board for which the package belongs.', short_name='b') |
24 gflags.DEFINE_string('packages', '', | 24 gflags.DEFINE_string('packages', '', |
25 'Space separated list of packages to mark as stable.', | 25 'Space separated list of packages to mark as stable.', |
26 short_name='p') | 26 short_name='p') |
27 gflags.DEFINE_string('push_options', '', | 27 gflags.DEFINE_string('push_options', '', |
28 'Options to use with git-cl push using push command.') | 28 'Options to use with git-cl push using push command.') |
29 gflags.DEFINE_string('srcroot', '%s/trunk/src' % os.environ['HOME'], | 29 gflags.DEFINE_string('srcroot', '%s/trunk/src' % os.environ['HOME'], |
30 'Path to root src directory.', | 30 'Path to root src directory.', |
31 short_name='r') | 31 short_name='r') |
32 gflags.DEFINE_string('tracking_branch', 'cros/master', | 32 gflags.DEFINE_string('tracking_branch', 'cros/master', |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 raise | 520 raise |
521 | 521 |
522 if revved_packages: | 522 if revved_packages: |
523 _CleanStalePackages(gflags.FLAGS.board, revved_packages) | 523 _CleanStalePackages(gflags.FLAGS.board, revved_packages) |
524 else: | 524 else: |
525 work_branch.Delete() | 525 work_branch.Delete() |
526 | 526 |
527 | 527 |
528 if __name__ == '__main__': | 528 if __name__ == '__main__': |
529 main(sys.argv) | 529 main(sys.argv) |
OLD | NEW |