mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-06-05 21:11:37 +00:00
buildd: Rename --v2 to --batch
This commit is contained in:
parent
a30e797e8c
commit
c1a9323035
34
buildd
34
buildd
@ -50,26 +50,32 @@ retryRescoreOptions.add_option("-a", "--arch", type = "string",
|
|||||||
"Valid architectures include: " \
|
"Valid architectures include: " \
|
||||||
"%s." % ", ".join(valid_archs))
|
"%s." % ", ".join(valid_archs))
|
||||||
|
|
||||||
# A new calling interface (v2)
|
# Batch processing options
|
||||||
v2options = OptionGroup(optParser, "Extended calling convention",
|
batch_options = OptionGroup(
|
||||||
"These options and parameter ordering is only available in the --v2 mode.\n"
|
optParser, "Batch processing",
|
||||||
"Usage: buildd --v2 [options] <package>...")
|
"These options and parameter ordering is only available in --batch mode.\n"
|
||||||
v2options.add_option('--v2', action = 'store_true', dest = 'v2mode', default = False,
|
"Usage: buildd --batch [options] <package>...")
|
||||||
help = 'Enable the new (v2) mode')
|
batch_options.add_option(
|
||||||
v2options.add_option('--series', action = 'store', dest = 'series', type = 'string',
|
'--batch', action = 'store_true', dest = 'batch', default = False,
|
||||||
|
help = 'Enable batch mode')
|
||||||
|
batch_options.add_option(
|
||||||
|
'--series', action = 'store', dest = 'series', type = 'string',
|
||||||
help = 'Selects the Ubuntu series to operate on (default: current development series)')
|
help = 'Selects the Ubuntu series to operate on (default: current development series)')
|
||||||
v2options.add_option('--retry', action = 'store_true', dest = 'retry', default = False,
|
batch_options.add_option(
|
||||||
|
'--retry', action = 'store_true', dest = 'retry', default = False,
|
||||||
help = 'Retry builds (give-back).')
|
help = 'Retry builds (give-back).')
|
||||||
v2options.add_option('--rescore', action = 'store', dest = 'priority', type = 'int',
|
batch_options.add_option(
|
||||||
|
'--rescore', action = 'store', dest = 'priority', type = 'int',
|
||||||
help = 'Rescore builds to <priority>.')
|
help = 'Rescore builds to <priority>.')
|
||||||
v2options.add_option('--arch2', action = 'append', dest = 'architecture', type = 'string',
|
batch_options.add_option(
|
||||||
|
'--arch2', action = 'append', dest = 'architecture', type = 'string',
|
||||||
help = "Affect only 'architecture' (can be used several times). "
|
help = "Affect only 'architecture' (can be used several times). "
|
||||||
"Valid architectures are: %s." % ', '.join(valid_archs))
|
"Valid architectures are: %s." % ', '.join(valid_archs))
|
||||||
|
|
||||||
# Add the retry options to the main group.
|
# Add the retry options to the main group.
|
||||||
optParser.add_option_group(retryRescoreOptions)
|
optParser.add_option_group(retryRescoreOptions)
|
||||||
# Add the new v2 mode to the main group.
|
# Add the batch mode to the main group.
|
||||||
optParser.add_option_group(v2options)
|
optParser.add_option_group(batch_options)
|
||||||
|
|
||||||
# Parse our options.
|
# Parse our options.
|
||||||
(options, args) = optParser.parse_args()
|
(options, args) = optParser.parse_args()
|
||||||
@ -78,7 +84,7 @@ if not len(args):
|
|||||||
optParser.print_help()
|
optParser.print_help()
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
if not options.v2mode:
|
if not options.batch:
|
||||||
# Check we have the correct number of arguments.
|
# Check we have the correct number of arguments.
|
||||||
if len(args) < 3:
|
if len(args) < 3:
|
||||||
optParser.error("Incorrect number of arguments.")
|
optParser.error("Incorrect number of arguments.")
|
||||||
@ -182,7 +188,7 @@ if not options.v2mode:
|
|||||||
"built in a former release." % (package, release.capitalize())
|
"built in a former release." % (package, release.capitalize())
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
# V2 mode
|
# Batch mode
|
||||||
|
|
||||||
if not options.architecture:
|
if not options.architecture:
|
||||||
# no specific architectures specified, assume all valid ones
|
# no specific architectures specified, assume all valid ones
|
||||||
|
Loading…
x
Reference in New Issue
Block a user