From 562c92d0d7be1dffd2a47a691b942cad2be1e2a9 Mon Sep 17 00:00:00 2001 From: Michal Marek Date: Fri, 31 Dec 2010 16:56:35 +0100 Subject: [PATCH] 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 --- osc/build.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/osc/build.py b/osc/build.py index 3c6aa6c3..b0aaca03 100644 --- a/osc/build.py +++ b/osc/build.py @@ -845,6 +845,8 @@ def main(apiurl, opts, argv): if need_root: sucmd = config['su-wrapper'].split() if sucmd[0] == 'su': + if sucmd[-1] == '-c': + sucmd.pop() cmd = sucmd + ['-s', cmd[0], 'root', '--' ] + cmd[1:] else: cmd = sucmd + cmd