remove references to the runroot task
This commit is contained in:
parent
4071f4db58
commit
4b5df841c8
6 changed files with 6 additions and 97 deletions
57
cli/koji
57
cli/koji
|
|
@ -2098,14 +2098,6 @@ def _parseTaskParams(session, method, task_id):
|
|||
for key in params[2].keys():
|
||||
if not key == '__starstar':
|
||||
lines.append("%s: %s" % (key, params[2][key]))
|
||||
elif method == 'runroot':
|
||||
lines.append("Tag: %s" % params[0])
|
||||
lines.append("Arch: %s" % params[1])
|
||||
lines.append("Command: %s" % (' '.join(params[2])))
|
||||
if len(params) > 3:
|
||||
for key in params[3].keys():
|
||||
if not key == '__starstar':
|
||||
lines.append("%s: %s" % (key, params[3][key]))
|
||||
elif method == 'newRepo':
|
||||
tag = session.getTag(params[0])
|
||||
lines.append("Tag: %s" % tag['name'])
|
||||
|
|
@ -2869,55 +2861,6 @@ def anon_handle_watch_logs(options, session, args):
|
|||
|
||||
watch_logs(session, tasks, options)
|
||||
|
||||
def handle_runroot(options, session, args):
|
||||
"[admin] Run a command in a buildroot"
|
||||
usage = _("usage: %prog runroot [options] target arch command")
|
||||
usage += _("\n(Specify the --help global option for a list of other help options)")
|
||||
parser = OptionParser(usage=usage)
|
||||
parser.disable_interspersed_args()
|
||||
parser.add_option("--package", action="append", default=[], help=_("make sure this package is in the chroot"))
|
||||
parser.add_option("--mount", action="append", default=[], help=_("mount this directory read-write in the chroot"))
|
||||
parser.add_option("--keep", action="store_true", default=False,
|
||||
help=_("Preserve the chroot after running (for debugging)"))
|
||||
parser.add_option("--skip-setarch", action="store_true", default=False,
|
||||
help=_("Do not use setarch"))
|
||||
parser.add_option("--use-shell", action="store_true", default=False,
|
||||
help=_("Run command through a shell, otherwise uses exec"))
|
||||
(options, args) = parser.parse_args(args)
|
||||
if len(args) < 3:
|
||||
parser.error(_("Incorrect number of arguments"))
|
||||
assert False
|
||||
activate_session(session)
|
||||
target = args[0]
|
||||
arch = args[1]
|
||||
if options.use_shell:
|
||||
# everything must be correctly quoted
|
||||
command = ' '.join(args[2:])
|
||||
else:
|
||||
command = args[2:]
|
||||
task_id = session.runroot(target, arch, command, keep=options.keep,
|
||||
packages=options.package, mounts=options.mount,
|
||||
skip_setarch=options.skip_setarch)
|
||||
try:
|
||||
while True:
|
||||
#wait for the task to finish
|
||||
if session.taskFinished(task_id):
|
||||
break
|
||||
time.sleep(2)
|
||||
except KeyboardInterrupt:
|
||||
# this is probably the right thing to do here
|
||||
print "User interrupt: canceling runroot task"
|
||||
session.cancelTask(task_id)
|
||||
return
|
||||
output = None
|
||||
try:
|
||||
output = session.downloadTaskOutput(task_id, "runroot.log")
|
||||
except koji.GenericError:
|
||||
pass
|
||||
if output:
|
||||
sys.stdout.write(output)
|
||||
return
|
||||
|
||||
def handle_make_task(options, session, args):
|
||||
"[admin] Create an arbitrary task"
|
||||
usage = _("usage: %prog make-task [options] <arg1> [<arg2>...]")
|
||||
|
|
|
|||
|
|
@ -99,7 +99,6 @@ CREATE TABLE permissions (
|
|||
INSERT INTO permissions (name) VALUES ('admin');
|
||||
INSERT INTO permissions (name) VALUES ('build');
|
||||
INSERT INTO permissions (name) VALUES ('repo');
|
||||
INSERT INTO permissions (name) VALUES ('runroot');
|
||||
|
||||
CREATE TABLE user_perms (
|
||||
user_id INTEGER NOT NULL REFERENCES users(id),
|
||||
|
|
@ -169,7 +168,7 @@ CREATE TABLE channels (
|
|||
|
||||
-- create default channel
|
||||
INSERT INTO channels (name) VALUES ('default');
|
||||
INSERT INTO channels (name) VALUES ('runroot');
|
||||
INSERT INTO channels (name) VALUES ('createrepo');
|
||||
|
||||
-- Here we track the build machines
|
||||
-- each host has an entry in the users table also
|
||||
|
|
|
|||
|
|
@ -406,13 +406,12 @@ def make_task(method,arglist,**opts):
|
|||
opts['label'] = None
|
||||
opts['parent'] = None
|
||||
#XXX - temporary workaround
|
||||
if method in ('buildArch', 'runroot') and opts['arch'] == 'noarch':
|
||||
if method == 'buildArch' and opts['arch'] == 'noarch':
|
||||
#not all arches can generate a proper buildroot for all tags
|
||||
if method == 'buildArch':
|
||||
tag = get_tag(arglist[1])
|
||||
else:
|
||||
tag = get_tag(arglist[0])
|
||||
tag = get_tag(arglist[1])
|
||||
fullarches = ('i386', 'ia64', 'ppc', 'ppc64', 's390', 's390x', 'x86_64')
|
||||
if not tag['arches']:
|
||||
raise koji.BuildError, 'no arches defined for tag %s' % tag['name']
|
||||
tagarches = tag['arches'].split()
|
||||
for a in fullarches:
|
||||
if a not in tagarches:
|
||||
|
|
@ -3848,17 +3847,6 @@ class RootExports(object):
|
|||
|
||||
return make_task('chainbuild',[srcs,target,opts],**taskOpts)
|
||||
|
||||
def runroot(self, target, arch, command, **opts):
|
||||
"""Create a runroot task
|
||||
|
||||
Returns the task id
|
||||
"""
|
||||
context.session.assertPerm('runroot')
|
||||
taskopts = {'priority':15,
|
||||
'arch': arch,
|
||||
'channel': 'runroot'}
|
||||
return mktask(taskopts,'runroot', target, arch, command, **opts)
|
||||
|
||||
def hello(self,*args):
|
||||
return "Hello World"
|
||||
|
||||
|
|
|
|||
|
|
@ -1526,19 +1526,6 @@ def taskLabel(taskInfo):
|
|||
if taskInfo.has_key('request'):
|
||||
build = taskInfo['request'][1]
|
||||
extra = buildLabel(build)
|
||||
elif method == 'runroot':
|
||||
if taskInfo.has_key('request'):
|
||||
tag, arch, command = taskInfo['request'][:3]
|
||||
if isinstance(command, str):
|
||||
cmdlist = command.split()
|
||||
else:
|
||||
cmdlist = command
|
||||
cmdlist = [param for param in cmdlist if '=' not in param]
|
||||
if cmdlist:
|
||||
cmd = os.path.basename(cmdlist[0])
|
||||
else:
|
||||
cmd = '(none)'
|
||||
extra = '%s, %s, %s' % (tag, cmd, arch)
|
||||
elif method == 'newRepo':
|
||||
pass
|
||||
elif method == 'prepRepo':
|
||||
|
|
|
|||
|
|
@ -105,13 +105,6 @@
|
|||
<strong>Source:</strong> $params[0]<br/>
|
||||
<strong>Build Target:</strong> <a href="buildtargetinfo?name=$params[1]">$params[1]</a><br/>
|
||||
$printOpts($params[2])
|
||||
#elif $task.method == 'runroot'
|
||||
<strong>Tag:</strong> <a href="taginfo?tagID=$params[0]">$params[0]</a><br/>
|
||||
<strong>Arch:</strong> $params[1]<br/>
|
||||
<strong>Command:</strong> $printValue('', $params[2], ' ')<br/>
|
||||
#if $len($params) > 3
|
||||
$printOpts($params[3])
|
||||
#end if
|
||||
#elif $task.method == 'newRepo'
|
||||
<strong>Tag:</strong> <a href="taginfo?tagID=$tag.id">$tag.name</a>
|
||||
#elif $task.method == 'prepRepo'
|
||||
|
|
@ -280,7 +273,7 @@ $result.faultString.strip()
|
|||
<a href="getfile?taskID=$task.id&name=$urllib.quote($filename)">$filename</a><br/>
|
||||
#end for
|
||||
#if $task.state not in ($koji.TASK_STATES.CLOSED, $koji.TASK_STATES.CANCELED, $koji.TASK_STATES.FAILED) and \
|
||||
$task.method in ('buildSRPMFromCVS', 'buildArch', 'runroot')
|
||||
$task.method in ('buildSRPMFromCVS', 'buildArch')
|
||||
<a href="watchlogs?taskID=$task.id">Watch logs</a>
|
||||
#end if
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -108,7 +108,6 @@ All
|
|||
<option value="buildNotification" #if $method == 'buildNotification' then 'selected="selected"' else ''#>buildNotification</option>
|
||||
<option value="tagBuild" #if $method == 'tagBuild' then 'selected="selected"' else ''#>tagBuild</option>
|
||||
<option value="tagNotification" #if $method == 'tagNotification' then 'selected="selected"' else ''#>tagNotification</option>
|
||||
<option value="runroot" #if $method == 'runroot' then 'selected="selected"' else ''#>runroot</option>
|
||||
<option value="newRepo" #if $method == 'newRepo' then 'selected="selected"' else ''#>newRepo</option>
|
||||
<option value="prepRepo" #if $method == 'prepRepo' then 'selected="selected"' else ''#>prepRepo</option>
|
||||
<option value="createrepo" #if $method == 'createrepo' then 'selected="selected"' else ''#>createrepo</option>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue