From 493bb457ec508f75a756b92d98d5ef0f29da20ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sun, 24 Oct 2010 10:18:23 +0200 Subject: Cleanup CVS calls in 'sync' action. Use 'exec' to avoid unnecessary redundant processes. Update the checkout code to use spawn_bash() like update does. --- pym/_emerge/actions.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'pym/_emerge/actions.py') diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index 71701d813..0908c2ca2 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -2386,7 +2386,9 @@ def action_sync(settings, trees, mtimedb, myopts, myaction): "!!! existing '%s' directory; exiting.\n" % myportdir) sys.exit(1) del e - if portage.spawn("cd "+cvsdir+"; cvs -z0 -d "+cvsroot+" co -P gentoo-x86",settings,free=1): + if portage.spawn_bash("cd %s; exec cvs -z0 -d %s co -P gentoo-x86" % \ + (portage._shell_quote(cvsdir), portage._shell_quote(cvsroot)), + settings, free=1): print("!!! cvs checkout error; exiting.") sys.exit(1) os.rename(os.path.join(cvsdir, "gentoo-x86"), myportdir) @@ -2394,7 +2396,7 @@ def action_sync(settings, trees, mtimedb, myopts, myaction): #cvs update print(">>> Starting cvs update with "+syncuri+"...") retval = portage.process.spawn_bash( - "cd %s; cvs -z0 -q update -dP" % \ + "cd %s; exec cvs -z0 -q update -dP" % \ (portage._shell_quote(myportdir),), **spawn_kwargs) if retval != os.EX_OK: sys.exit(retval) -- cgit v1.2.3-1-g7c22