From: Andrew Gaffney Date: Fri, 22 Jan 2010 13:31:22 +0000 (-0600) Subject: Actually pay attention to the 'delete' parameter for Gentoo bug #301769 X-Git-Tag: CATALYST-2.0.10~3^2~66 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=0d37d94198f3ae2e401e51d5b4268b822fc03e2f;p=catalyst.git Actually pay attention to the 'delete' parameter for Gentoo bug #301769 --- diff --git a/ChangeLog b/ChangeLog index f1027316..77c50767 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,10 @@ # Distributed under the GPL v2 # $Id$ + 22 Jan 2010; Andrew Gaffney + modules/catalyst/util.py: + Actually pay attention to the 'delete' parameter for Gentoo bug #301769 + 20 Jan 2010; Andrew Gaffney modules/catalyst/util.py: Missing space in catalyst.util.list_bashify() diff --git a/modules/catalyst/util.py b/modules/catalyst/util.py index 7427ac1b..0cb9ed17 100644 --- a/modules/catalyst/util.py +++ b/modules/catalyst/util.py @@ -239,7 +239,10 @@ def create_symlink(src, dest, remove_existing=False): raise CatalystError("Could not create symlink '%s' to '%s'" % (dest, src)) def rsync(src, dest, delete=False, extra_opts=""): - retval = catalyst.spawn.spawn_bash("rsync -a --delete %s %s %s" % (extra_opts, src, dest)) + delete_opts = "" + if delete: + delete_opts = "--delete" + retval = catalyst.spawn.spawn_bash("rsync -a %s %s %s %s" % (delete_opts, extra_opts, src, dest)) if retval != 0: raise CatalystError("Could not rsync '%s' to '%s'" % (src, dest))