mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-12 23:51:08 +00:00
- lpapiwrapper.py: fix typos
- buildd: add options for the new mode (v2)
This commit is contained in:
parent
b96c73ba64
commit
cdb1292963
18
buildd
18
buildd
@ -49,8 +49,26 @@ retryRescoreOptions.add_option("-a", "--arch", type = "string",
|
||||
"Valid architectures include: " \
|
||||
"%s." % ", ".join(validArchs))
|
||||
|
||||
# A new calling interface (v2)
|
||||
v2options = OptionGroup(optParser, "Extended calling convention",
|
||||
"These options and parameter ordering is only available in the --v2 mode.\n"
|
||||
"Usage: buildd --v2 [options] --series=SERIES <package>...")
|
||||
v2options.add_option('--v2', action = 'store_true', dest = 'v2mode', default = False,
|
||||
help = 'Enable the new (v2) mode')
|
||||
v2options.add_option('--series', action = 'store', dest = 'series', type = 'string',
|
||||
help = 'Selects the Ubuntu series to operate on.')
|
||||
v2options.add_option('--retry', action = 'store_true', dest = 'retry', default = False,
|
||||
help = 'Retry builds (give-back).')
|
||||
v2options.add_option('--rescore', action = 'store', dest = 'priority', type = 'int',
|
||||
help = 'Rescore builds to <priority>.')
|
||||
v2options.add_option('--arch2', action = 'append', dest = 'architecture', type = 'string',
|
||||
help = "Affect only 'architecture' (can be used several times). "
|
||||
"Valid architectures include: %s." % ', '.join(validArchs))
|
||||
|
||||
# Add the retry options to the main group.
|
||||
optParser.add_option_group(retryRescoreOptions)
|
||||
# Add the new v2 mode to the main group.
|
||||
optParser.add_option_group(v2options)
|
||||
|
||||
# Parse our options.
|
||||
(options, args) = optParser.parse_args()
|
||||
|
@ -420,7 +420,7 @@ class SourcePackage(BaseWrapper):
|
||||
else:
|
||||
res.append(' %s: failed' % arch)
|
||||
return "Retrying builds of '%s':\n%s" % (
|
||||
self.PackageName(), '\n'.join(res))
|
||||
self.getPackageName(), '\n'.join(res))
|
||||
|
||||
|
||||
class PersonTeam(BaseWrapper):
|
||||
@ -527,12 +527,12 @@ class Build(BaseWrapper):
|
||||
|
||||
def rescore(self, score):
|
||||
if self.can_be_rescored:
|
||||
self.rescore(score = score)
|
||||
self().rescore(score = score)
|
||||
return True
|
||||
return False
|
||||
|
||||
def retry(self):
|
||||
if self.can_be_tried:
|
||||
self.retry()
|
||||
if self.can_be_retried:
|
||||
self().retry()
|
||||
return True
|
||||
return False
|
||||
|
Loading…
x
Reference in New Issue
Block a user