handle task ids in download-build
This commit is contained in:
parent
d764ec7f4c
commit
e254586991
1 changed files with 7 additions and 0 deletions
7
cli/koji
7
cli/koji
|
|
@ -5919,6 +5919,7 @@ def anon_handle_download_build(options, session, args):
|
|||
parser.add_option("--type", help=_("Download archives of the given type, rather than rpms (maven, win, or image)"))
|
||||
parser.add_option("--latestfrom", dest="latestfrom", help=_("Download the latest build from this tag"))
|
||||
parser.add_option("--debuginfo", action="store_true", help=_("Also download -debuginfo rpms"))
|
||||
parser.add_option("--task-id", action="store_true", help=_("Interperet id as a task id"))
|
||||
parser.add_option("--key", help=_("Download rpms signed with the given key"))
|
||||
parser.add_option("--topurl", metavar="URL", default=options.topurl,
|
||||
help=_("URL under which Koji files are accessible"))
|
||||
|
|
@ -5940,6 +5941,12 @@ def anon_handle_download_build(options, session, args):
|
|||
print "--latestfrom not compatible with build IDs, specify a package name."
|
||||
return 1
|
||||
build = int(build)
|
||||
if suboptions.task_id:
|
||||
builds = session.listBuilds(taskID=build)
|
||||
if not builds:
|
||||
print "No associated builds for task %s" % build
|
||||
return 1
|
||||
build = builds[0]['build_id']
|
||||
|
||||
if suboptions.latestfrom:
|
||||
# We want the latest build, not a specific build
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue