- lpapiwrapper.py: fix typos

- buildd: add options for the new mode (v2)
This commit is contained in:
Michael Bienia 2009-07-25 17:03:14 +02:00
parent b96c73ba64
commit cdb1292963
2 changed files with 22 additions and 4 deletions

18
buildd
View File

@ -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()

View File

@ -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