From dd02a931ba95722c93e63914317c00ad626f02a5 Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Mon, 29 Dec 2008 18:45:57 +0000 Subject: [PATCH] * buildd: Show which architectures are available in help and created a list of them for easy addition of new ones. --- buildd | 13 +++++++++---- debian/changelog | 6 +++++- debian/copyright | 4 ++-- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/buildd b/buildd index f1d4685..864585e 100755 --- a/buildd +++ b/buildd @@ -5,7 +5,7 @@ # Copyright (C) 2007 Canonical Ltd. # Authors: # - Martin Pitt -# - Jonathan Patrick Davies +# - Jonathan Davies # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -37,6 +37,10 @@ usage = "%prog \n\n" usage += "Where operation may be one of: rescore, retry, or status.\n" usage += "Only Launchpad Buildd Admins may rescore package builds." +# Valid architectures. +validArchs = ["armel", "amd64", "hppa", "i386", + "ia64", "lpia", "powerpc", "sparc"] + # Prepare our option parser. optParser = OptionParser(usage) @@ -45,7 +49,9 @@ retryRescoreOptions = OptionGroup(optParser, "Retry and rescore options", "These options may only be used with the 'retry' and 'rescore' operations.") retryRescoreOptions.add_option("-a", "--arch", type = "string", action = "store", dest = "architecture", - help = "Rebuild or rescore a specific architecture.") + help = "Rebuild or rescore a specific architecture. " \ + "Valid architectures include: " \ + "%s." % ", ".join(validArchs)) # Add the retry options to the main group. optParser.add_option_group(retryRescoreOptions) @@ -72,8 +78,7 @@ if op not in ("retry", 'rescore') and options.architecture: print >> sys.stderr, "Operation %s does not use the --arch option." % op sys.exit(1) elif op in ("retry", "rescore") and options.architecture: - if options.architecture not in ("armel", "amd64", "hppa", "i386", "ia64", - "lpia", "powerpc", "sparc"): + if options.architecture not in validArchs: print >> sys.stderr, "Invalid architecture specified: %s." % options.architecture sys.exit(1) else: diff --git a/debian/changelog b/debian/changelog index 78ea110..10e7e0b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,7 +14,11 @@ ubuntu-dev-tools (0.50) UNRELEASED; urgency=low * pbuilder-dist.new: Add 'experimental' to list of known Debian releases. pbuilder-experimental works fine with pbuilder-dist.new. - -- Nathan Handler Mon, 22 Dec 2008 10:52:14 -0600 + [ Jonathan Davies ] + * buildd: Show which architectures are available in help and created a + list of them for easy addition of new ones. + + -- Jonathan Davies Mon, 29 Dec 2008 18:45:02 +0000 ubuntu-dev-tools (0.49) jaunty; urgency=low diff --git a/debian/copyright b/debian/copyright index bdcef58..fb5d85e 100644 --- a/debian/copyright +++ b/debian/copyright @@ -9,7 +9,7 @@ Upstream Authors: Daniel Holbach Iain Lane Jamin W. Collins - Jonathan Patrick Davies + Jonathan Davies Jordan Mantha Kees Cook Luke Yelavich @@ -37,7 +37,7 @@ Copyright: (C) 2007-2008, Siegfried-A. Gevatter (C) 2007, Terence Simpson (C) 2008, Iain Lane - (C) 2008, Jonathan Patrick Davies + (C) 2008, Jonathan Davies (C) 2008, Nathan handler Licenses: