OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2015 The LUCI Authors. All rights reserved. | 2 # Copyright 2015 The LUCI Authors. All rights reserved. |
3 # Use of this source code is governed under the Apache License, Version 2.0 | 3 # Use of this source code is governed under the Apache License, Version 2.0 |
4 # that can be found in the LICENSE file. | 4 # that can be found in the LICENSE file. |
5 | 5 |
6 """Tool to interact with recipe repositories. | 6 """Tool to interact with recipe repositories. |
7 | 7 |
8 This tool operates on the nearest ancestor directory containing an | 8 This tool operates on the nearest ancestor directory containing an |
9 infra/config/recipes.cfg. | 9 infra/config/recipes.cfg. |
10 """ | 10 """ |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 parser.add_argument( | 427 parser.add_argument( |
428 '--verbose', '-v', action='count', | 428 '--verbose', '-v', action='count', |
429 help='Increase logging verboisty') | 429 help='Increase logging verboisty') |
430 # TODO(phajdan.jr): Figure out if we need --no-fetch; remove if not. | 430 # TODO(phajdan.jr): Figure out if we need --no-fetch; remove if not. |
431 parser.add_argument( | 431 parser.add_argument( |
432 '--no-fetch', action='store_true', | 432 '--no-fetch', action='store_true', |
433 help='Disable automatic fetching') | 433 help='Disable automatic fetching') |
434 parser.add_argument('-O', '--project-override', metavar='ID=PATH', | 434 parser.add_argument('-O', '--project-override', metavar='ID=PATH', |
435 action=ProjectOverrideAction, | 435 action=ProjectOverrideAction, |
436 help='Override a project repository path with a local one.') | 436 help='Override a project repository path with a local one.') |
| 437 # TODO(phajdan.jr): Remove bootstrap switches once established as default. |
437 parser.add_argument( | 438 parser.add_argument( |
438 '--use-bootstrap', action='store_true', | 439 '--use-bootstrap', action='store_true', default=True, |
439 help='Use bootstrap/bootstrap.py to create a isolated python virtualenv' | 440 help='Use bootstrap/bootstrap.py to create a isolated python virtualenv' |
440 ' with required python dependencies.') | 441 ' with required python dependencies.') |
441 parser.add_argument( | 442 parser.add_argument( |
| 443 '--disable-bootstrap', action='store_false', dest='use_bootstrap', |
| 444 help='Disables bootstrap (see --use-bootstrap)') |
| 445 parser.add_argument( |
442 '--operational-args-path', action='store', | 446 '--operational-args-path', action='store', |
443 type=os.path.abspath, | 447 type=os.path.abspath, |
444 help='The path to an operational Arguments file. If provided, this file ' | 448 help='The path to an operational Arguments file. If provided, this file ' |
445 'must contain a JSONPB-encoded Arguments protobuf message, and will ' | 449 'must contain a JSONPB-encoded Arguments protobuf message, and will ' |
446 'be integrated into the runtime parameters.') | 450 'be integrated into the runtime parameters.') |
447 | 451 |
448 subp = parser.add_subparsers() | 452 subp = parser.add_subparsers() |
449 | 453 |
450 fetch_p = subp.add_parser( | 454 fetch_p = subp.add_parser( |
451 'fetch', | 455 'fetch', |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
762 | 766 |
763 if not isinstance(ret, int): | 767 if not isinstance(ret, int): |
764 if ret is None: | 768 if ret is None: |
765 ret = 0 | 769 ret = 0 |
766 else: | 770 else: |
767 print >> sys.stderr, ret | 771 print >> sys.stderr, ret |
768 ret = 1 | 772 ret = 1 |
769 sys.stdout.flush() | 773 sys.stdout.flush() |
770 sys.stderr.flush() | 774 sys.stderr.flush() |
771 os._exit(ret) | 775 os._exit(ret) |
OLD | NEW |