mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-16 01:21:07 +00:00
buildd: make the -a option not break in v2 mode
This commit is contained in:
parent
6c5a9971fe
commit
20157940ae
15
buildd
15
buildd
@ -45,7 +45,7 @@ optParser = OptionParser(usage)
|
|||||||
retryRescoreOptions = OptionGroup(optParser, "Retry and rescore options",
|
retryRescoreOptions = OptionGroup(optParser, "Retry and rescore options",
|
||||||
"These options may only be used with the 'retry' and 'rescore' operations.")
|
"These options may only be used with the 'retry' and 'rescore' operations.")
|
||||||
retryRescoreOptions.add_option("-a", "--arch", type = "string",
|
retryRescoreOptions.add_option("-a", "--arch", type = "string",
|
||||||
action = "store", dest = "architecture",
|
action = "append", dest = "architecture",
|
||||||
help = "Rebuild or rescore a specific architecture. " \
|
help = "Rebuild or rescore a specific architecture. " \
|
||||||
"Valid architectures include: " \
|
"Valid architectures include: " \
|
||||||
"%s." % ", ".join(valid_archs))
|
"%s." % ", ".join(valid_archs))
|
||||||
@ -64,7 +64,7 @@ v2options.add_option('--rescore', action = 'store', dest = 'priority', type = 'i
|
|||||||
help = 'Rescore builds to <priority>.')
|
help = 'Rescore builds to <priority>.')
|
||||||
v2options.add_option('--arch2', action = 'append', dest = 'architecture', type = 'string',
|
v2options.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 include: %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)
|
||||||
@ -98,12 +98,9 @@ if not options.v2mode:
|
|||||||
|
|
||||||
# If the user has specified an architecture to build, we only wish to rebuild it
|
# If the user has specified an architecture to build, we only wish to rebuild it
|
||||||
# and nothing else.
|
# and nothing else.
|
||||||
if op not in ("retry", 'rescore') and options.architecture:
|
if options.architecture:
|
||||||
print >> sys.stderr, "Operation %s does not use the --arch option." % op
|
if options.architecture[0] not in valid_archs:
|
||||||
sys.exit(1)
|
print >> sys.stderr, "Invalid architecture specified: %s." % options.architecture[0]
|
||||||
elif op in ("retry", "rescore") and options.architecture:
|
|
||||||
if options.architecture not in valid_archs:
|
|
||||||
print >> sys.stderr, "Invalid architecture specified: %s." % options.architecture
|
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
else:
|
else:
|
||||||
oneArch = True
|
oneArch = True
|
||||||
@ -154,7 +151,7 @@ if not options.v2mode:
|
|||||||
# Output list of arches for package and their status.
|
# Output list of arches for package and their status.
|
||||||
done = False
|
done = False
|
||||||
for build in builds:
|
for build in builds:
|
||||||
if oneArch and build.arch_tag != options.architecture:
|
if oneArch and build.arch_tag != options.architecture[0]:
|
||||||
# Skip this architecture.
|
# Skip this architecture.
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user