From 7e3aafc03785e709c361f278e75f280debafbe14 Mon Sep 17 00:00:00 2001 From: "mdehaan@mdehaan.rdu.redhat.com" <> Date: Wed, 20 Dec 2006 12:23:53 -0500 Subject: Keep repo representation as strings. Also, add trailing / to rsync URL's to always to prevent user mistakes, which allows us to know where the repomd data files are. --- cobbler/action_reposync.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cobbler/action_reposync.py') diff --git a/cobbler/action_reposync.py b/cobbler/action_reposync.py index 96d35f3..2aeffd1 100644 --- a/cobbler/action_reposync.py +++ b/cobbler/action_reposync.py @@ -69,11 +69,12 @@ class RepoSync: if not repo.keep_updated: print "- %s is set to not be updated" return True - print "imagine an rsync happened here, and that it was amazing..." dest_path = os.path.join(self.settings.webdir, "repo_mirror", repo.name) spacer = "" if repo.mirror.find("rsync://") != -1: spacer = "-e ssh" + if not repo.mirror.endswith("/"): + repo.mirror = "%s/" % repo.mirror cmd = "rsync -av %s --delete --delete-excluded --exclude-from=/etc/cobbler/rsync.exclude %s %s" % (spacer, repo.mirror, dest_path) print "executing: %s" % cmd rc = sub_process.call(cmd, shell=True) -- cgit