mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-07-27 14:51:29 +00:00
* buildd: Check that the architecture specified is correct and that --arch is
not used for incorrect operations.
This commit is contained in:
parent
e636aff690
commit
8ba739394c
18
buildd
18
buildd
@ -52,8 +52,8 @@ optParser.add_option_group(retryOptions)
|
|||||||
if len(args) < 3:
|
if len(args) < 3:
|
||||||
optParser.error("Incorrect number of arguments.")
|
optParser.error("Incorrect number of arguments.")
|
||||||
|
|
||||||
package = str(args[0])
|
package = str(args[0]).lower()
|
||||||
release = str(args[1])
|
release = str(args[1]).lower()
|
||||||
op = str(args[2]).lower()
|
op = str(args[2]).lower()
|
||||||
|
|
||||||
# Check our operation.
|
# Check our operation.
|
||||||
@ -63,8 +63,18 @@ if op not in ("rescore", "retry", "status"):
|
|||||||
|
|
||||||
# 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 options.architecture: oneArch = True
|
if op != "retry" and options.architecture:
|
||||||
else: oneArch = False
|
print >> sys.stderr, "Operation %s does not use the --arch option." % op
|
||||||
|
sys.exit(1)
|
||||||
|
elif op == "retry" and options.architecture:
|
||||||
|
if options.architecture not in ("sparc", "powerpc", "lpia", "ia64", "i386",
|
||||||
|
"hppa", "amd64"):
|
||||||
|
print >> sys.stderr, "Invalid architecture specified: %s." % options.architecture
|
||||||
|
sys.exit(1)
|
||||||
|
else:
|
||||||
|
oneArch = True
|
||||||
|
else:
|
||||||
|
oneArch = False
|
||||||
|
|
||||||
# Prepare Launchpad cookie.
|
# Prepare Launchpad cookie.
|
||||||
launchpadCookie = common.prepareLaunchpadCookie()
|
launchpadCookie = common.prepareLaunchpadCookie()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user