non-scratch image builds require --ksurl
This commit is contained in:
parent
27360ff12c
commit
5446047474
2 changed files with 5 additions and 0 deletions
3
cli/koji
3
cli/koji
|
|
@ -5142,6 +5142,9 @@ def _build_image_oz(options, task_opts, session, args):
|
|||
# Upload the KS file to the staging area.
|
||||
# If it's a URL, it's kojid's job to go get it when it does the checkout.
|
||||
if not task_opts.ksurl:
|
||||
if not task_opts.scratch:
|
||||
# only scratch builds can omit ksurl
|
||||
raise koji.GenericError, _("Non-scratch builds must provide ksurl")
|
||||
ksfile = task_opts.kickstart
|
||||
serverdir = _unique_path('cli-image')
|
||||
session.uploadWrapper(ksfile, serverdir, callback=callback)
|
||||
|
|
|
|||
|
|
@ -7124,6 +7124,8 @@ class RootExports(object):
|
|||
'only admins may create high-priority tasks'
|
||||
|
||||
taskOpts['priority'] = koji.PRIO_DEFAULT + priority
|
||||
if not opts.has_key('scratch') and not opts.has_key('ksurl'):
|
||||
raise koji.ActionNotAllowed, 'Non-scratch builds must provide ksurl'
|
||||
|
||||
return make_task('image', [name, version, arches, target, inst_tree, opts], **taskOpts)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue