From 0d37d94198f3ae2e401e51d5b4268b822fc03e2f Mon Sep 17 00:00:00 2001 From: Andrew Gaffney Date: Fri, 22 Jan 2010 07:31:22 -0600 Subject: [PATCH] Actually pay attention to the 'delete' parameter for Gentoo bug #301769 --- ChangeLog | 4 ++++ modules/catalyst/util.py | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) 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)) -- 2.26.2