Fix setting keywords in the SSH interface

This was broken in commit 8914a41db9 which
refactored the argument parsing. Instead of checking for at least the
set-keywords command and a pkgbase name, we were checking for *exactly*
the command and pkgbase name, leaving no room for keywords...

As a result, while we could clear the keywords, we could not set them.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
Eli Schwartz 2017-07-20 17:51:43 -04:00 committed by Lukas Fleischer
parent ad4acfb9aa
commit 243fb92273

View file

@ -502,7 +502,7 @@ def serve(action, cmdargv, user, privileged, remote_addr):
cmd = action + " '" + repo_path + "'" cmd = action + " '" + repo_path + "'"
os.execl(git_shell_cmd, git_shell_cmd, '-c', cmd) os.execl(git_shell_cmd, git_shell_cmd, '-c', cmd)
elif action == 'set-keywords': elif action == 'set-keywords':
checkarg(cmdargv, 'repository name') checkarg_atleast(cmdargv, 'repository name')
pkgbase_set_keywords(cmdargv[1], cmdargv[2:]) pkgbase_set_keywords(cmdargv[1], cmdargv[2:])
elif action == 'list-repos': elif action == 'list-repos':
checkarg(cmdargv) checkarg(cmdargv)