rsync.exclude(excl)
rsync.archive().hard_links().xattrs().sparse().acls()
- rsync.run('/', target)
+ rsync.run('/', target, 'host', 'tmp image')
# We need to replace the old UUID referencies with the new
# ones in grub configuration files and /etc/fstab for file
self._exclude = []
self._options = ['-v']
- def run(self, src, dest):
+ def run(self, src, dest, slabel='source', dlabel='destination'):
"""Run the actual command"""
cmd = []
cmd.append('rsync')
for i in self._exclude:
cmd.extend(['--exclude', i])
- self._out.output("Calculating total number of host files ...", False)
+ self._out.output("Calculating total number of %s files ..." % slabel,
+ False)
# If you don't specify a destination, rsync will list the source files.
dry_run = subprocess.Popen(cmd + [src], shell=False,
self._out.success("%d" % total)
- progress = self._out.Progress(total,
- "Copying host files into the image")
+ progress = self._out.Progress(total, "Copying %s files to %s" %
+ (slabel, dlabel))
run = subprocess.Popen(cmd + [src, dest], shell=False,
stdout=subprocess.PIPE, bufsize=0)
try: