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 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 command != 'clean' and 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 if command != 'clean': |
| 504 Warning('Missing --overlays argument') |
504 overlays = { | 505 overlays = { |
505 '%s/private-overlays/chromeos-overlay' % gflags.FLAGS.srcroot: [], | 506 '%s/private-overlays/chromeos-overlay' % gflags.FLAGS.srcroot: [], |
506 '%s/third_party/chromiumos-overlay' % gflags.FLAGS.srcroot: [] | 507 '%s/third_party/chromiumos-overlay' % gflags.FLAGS.srcroot: [] |
507 } | 508 } |
508 | 509 |
509 if command == 'commit': | 510 if command == 'commit': |
510 _BuildEBuildDictionary(overlays, gflags.FLAGS.all, package_list) | 511 _BuildEBuildDictionary(overlays, gflags.FLAGS.all, package_list) |
511 | 512 |
512 for overlay, ebuilds in overlays.items(): | 513 for overlay, ebuilds in overlays.items(): |
513 if not os.path.isdir(overlay): | 514 if not os.path.isdir(overlay): |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 raise | 549 raise |
549 | 550 |
550 if revved_packages: | 551 if revved_packages: |
551 _CleanStalePackages(gflags.FLAGS.board, revved_packages) | 552 _CleanStalePackages(gflags.FLAGS.board, revved_packages) |
552 else: | 553 else: |
553 work_branch.Delete() | 554 work_branch.Delete() |
554 | 555 |
555 | 556 |
556 if __name__ == '__main__': | 557 if __name__ == '__main__': |
557 main(sys.argv) | 558 main(sys.argv) |
OLD | NEW |