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

Side by Side Diff: cros_mark_as_stable.py

Issue 4988004: Special-case preflight clean to allow for missing directories. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git@master
Patch Set: Alternative approach Created 10 years, 1 month 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 """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
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
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)
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