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 |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 else: | 489 else: |
490 command = argv[1] | 490 command = argv[1] |
491 except gflags.FlagsError, e : | 491 except gflags.FlagsError, e : |
492 _PrintUsageAndDie(str(e)) | 492 _PrintUsageAndDie(str(e)) |
493 | 493 |
494 package_list = gflags.FLAGS.packages.split(':') | 494 package_list = gflags.FLAGS.packages.split(':') |
495 _CheckSaneArguments(package_list, command) | 495 _CheckSaneArguments(package_list, command) |
496 if gflags.FLAGS.overlays: | 496 if gflags.FLAGS.overlays: |
497 overlays = {} | 497 overlays = {} |
498 for path in gflags.FLAGS.overlays.split(':'): | 498 for path in gflags.FLAGS.overlays.split(':'): |
499 if not os.path.isdir(path): | 499 if command != 'clean' and not os.path.isdir(path): |
500 Die('Cannot find overlay: %s' % path) | 500 Die('Cannot find overlay: %s' % path) |
501 overlays[path] = [] | 501 overlays[path] = [] |
502 else: | 502 else: |
503 Warning('Missing --overlays argument') | 503 Warning('Missing --overlays argument') |
504 overlays = { | 504 overlays = { |
505 '%s/private-overlays/chromeos-overlay' % gflags.FLAGS.srcroot: [], | 505 '%s/private-overlays/chromeos-overlay' % gflags.FLAGS.srcroot: [], |
506 '%s/third_party/chromiumos-overlay' % gflags.FLAGS.srcroot: [] | 506 '%s/third_party/chromiumos-overlay' % gflags.FLAGS.srcroot: [] |
507 } | 507 } |
508 | 508 |
509 if command == 'commit': | 509 if command == 'commit': |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 raise | 548 raise |
549 | 549 |
550 if revved_packages: | 550 if revved_packages: |
551 _CleanStalePackages(gflags.FLAGS.board, revved_packages) | 551 _CleanStalePackages(gflags.FLAGS.board, revved_packages) |
552 else: | 552 else: |
553 work_branch.Delete() | 553 work_branch.Delete() |
554 | 554 |
555 | 555 |
556 if __name__ == '__main__': | 556 if __name__ == '__main__': |
557 main(sys.argv) | 557 main(sys.argv) |
OLD | NEW |