1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 14:56:14 +01:00

build: Fix for su-wrapper = su -c

su-wrapper = su -c has been broken since commit 5376580. Handle this
case so that people do not have to update their configs.

Signed-off-by: Michal Marek <mmarek@suse.cz>
This commit is contained in:
Michal Marek 2010-12-31 16:56:35 +01:00 committed by Marcus Huewe
parent 50ae7c7c24
commit 562c92d0d7

View File

@ -845,6 +845,8 @@ def main(apiurl, opts, argv):
if need_root: if need_root:
sucmd = config['su-wrapper'].split() sucmd = config['su-wrapper'].split()
if sucmd[0] == 'su': if sucmd[0] == 'su':
if sucmd[-1] == '-c':
sucmd.pop()
cmd = sucmd + ['-s', cmd[0], 'root', '--' ] + cmd[1:] cmd = sucmd + ['-s', cmd[0], 'root', '--' ] + cmd[1:]
else: else:
cmd = sucmd + cmd cmd = sucmd + cmd