From dd22ce7bfa0b3f99c5eb66798b0217a32c58912c Mon Sep 17 00:00:00 2001 From: Nikos Skalkotos Date: Thu, 21 Mar 2013 14:21:56 +0200 Subject: [PATCH] Fix a bug in the way rsync copies files The exclude patterns were wrong and they excluded more files than they should. --- image_creator/bundle_volume.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/image_creator/bundle_volume.py b/image_creator/bundle_volume.py index a6fc27a..9a9a366 100644 --- a/image_creator/bundle_volume.py +++ b/image_creator/bundle_volume.py @@ -387,8 +387,7 @@ class BundleVolume(object): rsync = Rsync(self.out) - # Excluded paths need to be relative to the source - for excl in map(lambda p: p[1:], excluded + [image]): + for excl in excluded + [image]: rsync.exclude(excl) rsync.archive().hard_links().xattrs().sparse().acls() @@ -467,8 +466,8 @@ class BundleVolume(object): dirname = os.path.dirname(image) self.out.output("Examining available space ...", False) if free_space(dirname) <= size: - raise FatalError('Not enough space under %s to host the image' % - dirname) + raise FatalError("Not enough space under %s to host the temporary " + "image" % dirname) self.out.success("sufficient") self._create_filesystems(image, partitions) -- 1.7.10.4